ImboUnitTest\Http\Response\Formatter\XMLTest::testCanFormatAnErrorModelWhenNoImageIdentifierExists PHP Method

testCanFormatAnErrorModelWhenNoImageIdentifierExists() public method

    public function testCanFormatAnErrorModelWhenNoImageIdentifierExists()
    {
        $date = new DateTime();
        $model = $this->getMock('Imbo\\Model\\Error');
        $model->expects($this->once())->method('getDate')->will($this->returnValue($date));
        $model->expects($this->once())->method('getImageIdentifier')->will($this->returnValue(null));
        $xml = $this->formatter->format($model);
        $this->assertXPathDoesNotMatch('//imageIdentifier', $xml, 'Image identifier should not be present');
    }