tests/UnitTests/POData/Writers/Atom/AtomODataWriterTest.php
/** 
     * test for write top level primitive property.
     */
test for write top level primitive property.
test for write top level primitive property .
public function testPrimitiveProperty(){
    	$prop = new ODataProperty();
    	$prop->name = "Count";
    	$prop->typeName = null;
    	$prop->value = "56";
    	$propCont = new ODataPropertyContent();
    	$propCont->properties = array($prop);
	    $writer = new AtomODataWriter('http://localhost/NorthWind.svc');
	    $result = $writer->write($propCont);
	    $this->assertSame($writer, $result);
	    $actual = $writer->getOutput();
	    $expected = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<d:Count xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">56</d:Count>';
	    $this->assertXmlStringEqualsXmlString($expected, $actual);
    }
public function testPrimitiveProperty ( ) { $ prop = new ODataProperty ( ) ; $ prop -> name = " Count " ; $ prop -> typeName = null ; $ prop -> value = " 56 " ; $ propCont = new ODataPropertyContent ( ) ; $ propCont -> properties = array ( $ prop ) ; $ writer = new AtomODataWriter ( 'http://localhost/NorthWind.svc' ) ; $ result = $ writer -> write ( $ propCont ) ; $ this -> assertSame ( $ writer , $ result ) ; $ actual = $ writer -> getOutput ( ) ; $ expected = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<d:Count xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">56</d:Count>' ; $ this -> assertXmlStringEqualsXmlString ( $ expected , $ actual ) ; }
test for write top level primitive property.
test for write top level primitive property .