| 1 | <?php |
||
| 16 | class BridgeTest extends WebTestCase |
||
| 17 | { |
||
| 18 | const TEST_CASE_NAME = 'Bridge'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @expectedException \Superdesk\ContentApiSdk\Exception\ContentApiException |
||
| 22 | * @dataProvider getConfigs |
||
| 23 | */ |
||
| 24 | public function testIndexForCallToInvalidEndpoints($config) |
||
| 25 | { |
||
| 26 | $client = $this->createClient(array('test_case' => self::TEST_CASE_NAME, 'root_config' => $config)); |
||
| 27 | |||
| 28 | $client->request('GET', '/bridge/invalid_endpoint/'); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getConfigs() |
||
| 32 | { |
||
| 33 | return array( |
||
| 34 | array('config.yml'), |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | public static function setUpBeforeClass() |
||
| 39 | { |
||
| 40 | parent::deleteTmpDir(self::TEST_CASE_NAME); |
||
| 41 | } |
||
| 42 | |||
| 43 | public static function tearDownAfterClass() |
||
| 44 | { |
||
| 45 | parent::deleteTmpDir(self::TEST_CASE_NAME); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |