Tests/Unit/Import/ImportHelperTest.php
/**
     * Tests assign logic of ImportHelper static class.
     */
Tests assign logic of ImportHelper static class.
Tests assign logic of ImportHelper static class .
public function testImportHelperAssign()
    {
        $mockObject = $this
            ->getMock('ONGR\XtCommerceConnectorBundle\Documents\ImageDocument', ['setTitle', 'setDescription']);
        $mockObject->expects($this->once())->method('setTitle')->with('Title')->willReturn(null);
        $mockObject->expects($this->once())->method('setDescription')->with('description')->willReturn(null);
        $assignedObject = ImportHelper::assign(['Title' => 'Title', 'Description' => 'description'], $mockObject);
        $this->assertEquals($assignedObject, $mockObject);
    }
public function testImportHelperAssign ( ) { $ mockObject = $ this -> getMock ( 'ONGR\XtCommerceConnectorBundle\Documents\ImageDocument' , [ 'setTitle' , 'setDescription' ] ) ; $ mockObject -> expects ( $ this -> once ( ) ) -> method ( 'setTitle' ) -> with ( 'Title' ) -> willReturn ( null ) ; $ mockObject -> expects ( $ this -> once ( ) ) -> method ( 'setDescription' ) -> with ( 'description' ) -> willReturn ( null ) ; $ assignedObject = ImportHelper :: assign ( [ 'Title' => 'Title' , 'Description' => 'description' ] , $ mockObject ) ; $ this -> assertEquals ( $ assignedObject , $ mockObject ) ; }
Tests assign logic of ImportHelper static class.
Tests assign logic of ImportHelper static class .