/** * Make sure that the loader can handle .dist files. */ public function testSupports() { $this->loader->expects($this->exactly(3))->method('getSupportedExtensions')->will($this->returnValue(array('php'))); $this->assertTrue($this->loader->supports('test.php'), 'The non-.dist file should be supported.'); $this->assertTrue($this->loader->supports('test.php.dist'), 'The .dist file should be supported.'); $this->assertFalse($this->loader->supports('test.xml.dist'), 'The file should not be supported.'); $this->assertFalse($this->loader->supports(array()), 'The array resource should not be supported.'); }
public function testDoesNotSupportWithAnotherThenListActionsEvenControllerIsEntityManagerAwareController() { $context = $this->createContext($this->getMock('Oro\\Bundle\\SoapBundle\\Controller\\Api\\EntityManagerAwareInterface'), null, null, RestApiReadInterface::ACTION_READ); $this->assertFalse($this->handler->supports($context)); }
/** * @dataProvider supportsDataProvider * * @param mixed $user * @param bool $expectedResult */ public function testSupports($user, $expectedResult) { $this->securityFacade->expects($this->once())->method('getLoggedUser')->willReturn($user); $this->assertEquals($expectedResult, $this->decisionMaker->supports()); }
/** * @dataProvider supportsProvider */ public function testSupports($schemas, $expected) { $this->assertEquals($expected, $this->extension->supports($schemas)); }