Tests/Unit/Modifier/ImportModifierTest.php
/**
     * Tests behaviour of modifier when not an ImportItem is given.
     */
Tests behaviour of modifier when not an ImportItem is given.
Tests behaviour of modifier when not an ImportItem is given .
public function testImportModifierBadImportItem()
    {
        $mod = new ImportModifier();
        $mockItem = $this->getMockBuilder('ONGR\ConnectionsBundle\Pipeline\Item\AbstractImportItem')
            ->disableOriginalConstructor()
            ->setMethods(['getDocument', 'setDocument'])
            ->getMockForAbstractClass();
        $mockItem->expects($this->never())->method('setDocument');
        $mockItem->expects($this->never())->method('getDocument');
        $mod->modify($mockItem, new ItemPipelineEvent(null));
    }
public function testImportModifierBadImportItem ( ) { $ mod = new ImportModifier ( ) ; $ mockItem = $ this -> getMockBuilder ( 'ONGR\ConnectionsBundle\Pipeline\Item\AbstractImportItem' ) -> disableOriginalConstructor ( ) -> setMethods ( [ 'getDocument' , 'setDocument' ] ) -> getMockForAbstractClass ( ) ; $ mockItem -> expects ( $ this -> never ( ) ) -> method ( 'setDocument' ) ; $ mockItem -> expects ( $ this -> never ( ) ) -> method ( 'getDocument' ) ; $ mod -> modify ( $ mockItem , new ItemPipelineEvent ( null ) ) ; }
Tests behaviour of modifier when not an ImportItem is given.
Tests behaviour of modifier when not an ImportItem is given .