getMockBuilder('appbox') ->disableOriginalConstructor() ->getMock(); $app = $this->getApplication(); $app['conf'] = $this->getMockBuilder('Alchemy\Phrasea\Core\Configuration\PropertyAccess') ->disableOriginalConstructor() ->getMock(); $app['conf']->expects($this->once()) ->method('set') ->with(['main', 'search-engine'], [ 'type' => 'Alchemy\Phrasea\SearchEngine\Phrasea\PhraseaEngine', 'options' => [], ]); $this->assertTrue($patch->apply($appbox, $app)); } }