Adding enclosures now treats type and length parameters as optional for Atom, but...
[zend.git] / tests / Zend / Gdata / Spreadsheets / ListFeedTest.php
blob545e9a1e39885b0882417d72f58c9456a550f2df
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Gdata_Spreadsheets
17 * @subpackage UnitTests
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id $
23 require_once 'Zend/Gdata/Spreadsheets.php';
24 require_once 'Zend/Http/Client.php';
26 /**
27 * @category Zend
28 * @package Zend_Gdata_Spreadsheets
29 * @subpackage UnitTests
30 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
31 * @license http://framework.zend.com/license/new-bsd New BSD License
32 * @group Zend_Gdata
33 * @group Zend_Gdata_Spreadsheets
35 class Zend_Gdata_Spreadsheets_ListFeedTest extends PHPUnit_Framework_TestCase
38 public function setUp()
40 $this->listFeed = new Zend_Gdata_Spreadsheets_ListFeed(
41 file_get_contents(dirname(__FILE__) . '/_files/TestDataListFeedSample1.xml'),
42 true);
45 public function testToAndFromString()
47 $this->assertTrue(count($this->listFeed->entries) == 1);
48 foreach($this->listFeed->entries as $entry)
50 $this->assertTrue($entry instanceof Zend_Gdata_Spreadsheets_ListEntry);
53 $newListFeed = new Zend_Gdata_Spreadsheets_ListFeed();
54 $doc = new DOMDocument();
55 $doc->loadXML($this->listFeed->saveXML());
56 $newListFeed->transferFromDom($doc->documentElement);
58 $this->assertTrue(count($newListFeed->entries) == 1);
59 foreach($newListFeed->entries as $entry)
61 $this->assertTrue($entry instanceof Zend_Gdata_Spreadsheets_ListEntry);