Skip to content

Commit 7195984

Browse files
committed
- Tests
1 parent fec8c08 commit 7195984

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

tests/IPubTests/JsonAPIClient/ExtensionTest.phpt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
<?php
22
/**
3-
* Test: IPub\DataTables\Extension
3+
* Test: IPub\JsonAPIClient\Extension
44
* @testCase
55
*
66
* @copyright More in license.md
77
* @license https://www.ipublikuj.eu
88
* @author Adam Kadlec <[email protected]>
9-
* @package iPublikuj:DataTables!
9+
* @package iPublikuj:JsonAPIClient!
1010
* @subpackage Tests
1111
* @since 1.0.0
1212
*
13-
* @date 16.03.18
13+
* @date 11.05.18
1414
*/
1515

1616
declare(strict_types = 1);
1717

18-
namespace IPubTests\DataTables;
18+
namespace IPubTests\JsonAPIClient;
1919

2020
use Nette;
2121

2222
use Tester;
2323
use Tester\Assert;
2424

25-
use IPub\DataTables;
25+
use IPub\JsonAPIClient;
2626

2727
require __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'bootstrap.php';
2828

2929
/**
3030
* Extension registration tests
3131
*
32-
* @package iPublikuj:DataTables!
32+
* @package iPublikuj:JsonAPIClient!
3333
* @subpackage Tests
3434
*
3535
* @author Adam Kadlec <[email protected]>
@@ -40,8 +40,8 @@ class ExtensionTest extends Tester\TestCase
4040
{
4141
$dic = $this->createContainer();
4242

43-
Assert::true($dic->getService('dataTables.stateSaver') instanceof DataTables\StateSavers\StateSaver);
44-
Assert::true($dic->getService('dataTables.grid') instanceof DataTables\Components\Control);
43+
Assert::true($dic->getService('jsonApiClient.schemas') instanceof JsonAPIClient\Schemas\SchemaProvider);
44+
Assert::true($dic->getService('jsonApiClient.client') instanceof JsonAPIClient\Clients\IClient);
4545
}
4646

4747
/**
@@ -52,7 +52,9 @@ class ExtensionTest extends Tester\TestCase
5252
$config = new Nette\Configurator();
5353
$config->setTempDirectory(TEMP_DIR);
5454

55-
DataTables\DI\DataTablesExtension::register($config);
55+
JsonAPIClient\DI\JsonAPIClientExtension::register($config);
56+
57+
$config->addConfig(__DIR__ . DS . 'files' . DS . 'config.neon');
5658

5759
return $config->createContainer();
5860
}
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
application:
2-
mapping:
3-
*: IPubTests\ConfirmationDialog\*Presenter
4-
5-
services:
6-
# Test presenter
7-
presenters.test:
8-
class: IPubTests\ConfirmationDialog\TestPresenter
9-
10-
router: IPubTests\ConfirmationDialog\Libs\RouterFactory::createRouter
1+
jsonApiClient:
2+
baseUri: https://jsonapi.endpoint.ipublikuj.eu/v1

0 commit comments

Comments
 (0)