@@ -28,15 +28,15 @@ |
||
28 | 28 | public function testWhenNoConnection_storeEntityFingerprintThrowsException() { |
29 | 29 | $writer = TestEnvironment::newInstanceWithoutTables()->getFactory()->newTermStoreWriter(); |
30 | 30 | |
31 | - $this->expectException( TermStoreException::class ); |
|
32 | - $writer->storeEntityFingerprint( new ItemId( 'Q1' ), new Fingerprint() ); |
|
31 | + $this->expectException(TermStoreException::class); |
|
32 | + $writer->storeEntityFingerprint(new ItemId('Q1'), new Fingerprint()); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function testWhenNoConnection_dropTermsForIdThrowsException() { |
36 | 36 | $writer = TestEnvironment::newInstanceWithoutTables()->getFactory()->newTermStoreWriter(); |
37 | 37 | |
38 | - $this->expectException( TermStoreException::class ); |
|
39 | - $writer->dropTermsForId( new ItemId( 'Q1' ) ); |
|
38 | + $this->expectException(TermStoreException::class); |
|
39 | + $writer->dropTermsForId(new ItemId('Q1')); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | } |
@@ -24,22 +24,22 @@ |
||
24 | 24 | private $store; |
25 | 25 | |
26 | 26 | public function setUp() { |
27 | - $connection = DriverManager::getConnection( array( |
|
27 | + $connection = DriverManager::getConnection(array( |
|
28 | 28 | 'driver' => 'pdo_sqlite', |
29 | 29 | 'memory' => true, |
30 | - ) ); |
|
30 | + )); |
|
31 | 31 | |
32 | - $this->store = new TermStore( $connection, new TermStoreConfig( '' ) ); |
|
32 | + $this->store = new TermStore($connection, new TermStoreConfig('')); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function testInsertWhenStoreNotInstalledCausesTermStoreException() { |
36 | - $id = new ItemId( 'Q1337' ); |
|
36 | + $id = new ItemId('Q1337'); |
|
37 | 37 | |
38 | 38 | $fingerprint = new Fingerprint(); |
39 | - $fingerprint->setLabel( 'en', 'EN label' ); |
|
39 | + $fingerprint->setLabel('en', 'EN label'); |
|
40 | 40 | |
41 | - $this->expectException( TermStoreException::class ); |
|
42 | - $this->store->storeEntityFingerprint( $id, $fingerprint ); |
|
41 | + $this->expectException(TermStoreException::class); |
|
42 | + $this->store->storeEntityFingerprint($id, $fingerprint); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | } |
@@ -27,30 +27,30 @@ |
||
27 | 27 | private $schemaManager; |
28 | 28 | |
29 | 29 | public function setUp() { |
30 | - $connection = DriverManager::getConnection( array( |
|
30 | + $connection = DriverManager::getConnection(array( |
|
31 | 31 | 'driver' => 'pdo_sqlite', |
32 | 32 | 'memory' => true, |
33 | - ) ); |
|
33 | + )); |
|
34 | 34 | |
35 | 35 | $this->schemaManager = $connection->getSchemaManager(); |
36 | - $this->storeInstaller = new TermStoreInstaller( $this->schemaManager, new TermStoreConfig( 'kittens_' ) ); |
|
36 | + $this->storeInstaller = new TermStoreInstaller($this->schemaManager, new TermStoreConfig('kittens_')); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function testInstallationAndRemoval() { |
40 | 40 | $this->storeInstaller->install(); |
41 | 41 | |
42 | - $this->assertTrue( $this->schemaManager->tablesExist( 'kittens_labels' ) ); |
|
43 | - $this->assertTrue( $this->schemaManager->tablesExist( 'kittens_aliases' ) ); |
|
42 | + $this->assertTrue($this->schemaManager->tablesExist('kittens_labels')); |
|
43 | + $this->assertTrue($this->schemaManager->tablesExist('kittens_aliases')); |
|
44 | 44 | |
45 | 45 | $this->storeInstaller->uninstall(); |
46 | 46 | |
47 | - $this->assertFalse( $this->schemaManager->tablesExist( 'kittens_labels' ) ); |
|
48 | - $this->assertFalse( $this->schemaManager->tablesExist( 'kittens_aliases' ) ); |
|
47 | + $this->assertFalse($this->schemaManager->tablesExist('kittens_labels')); |
|
48 | + $this->assertFalse($this->schemaManager->tablesExist('kittens_aliases')); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | public function testStoresPage() { |
52 | 52 | $this->storeInstaller->install(); |
53 | - $this->assertTrue( true ); |
|
53 | + $this->assertTrue(true); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | } |