@@ -43,14 +43,14 @@ |
||
| 43 | 43 | public function testGetSearchAttributes() |
| 44 | 44 | { |
| 45 | 45 | foreach( $this->object->getSearchAttributes() as $attr ) { |
| 46 | - $this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attr ); |
|
| 46 | + $this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Attribute\\Iface', $attr ); |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | |
| 51 | 51 | public function testGetSubManager() |
| 52 | 52 | { |
| 53 | - $this->setExpectedException('\\Aimeos\\MAdmin\\Exception'); |
|
| 53 | + $this->setExpectedException( '\\Aimeos\\MAdmin\\Exception' ); |
|
| 54 | 54 | $this->object->getSubManager( 'unknown' ); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -158,9 +158,12 @@ |
||
| 158 | 158 | |
| 159 | 159 | public function testGetCache() |
| 160 | 160 | { |
| 161 | - try { |
|
| 161 | + try |
|
| 162 | + { |
|
| 162 | 163 | $this->assertInstanceOf( '\\Aimeos\\MW\\Cache\\Iface', $this->object->getCache() ); |
| 163 | - } catch( \Aimeos\MAdmin\Cache\Exception $e ) { |
|
| 164 | + } |
|
| 165 | + catch( \Aimeos\MAdmin\Cache\Exception $e ) |
|
| 166 | + { |
|
| 164 | 167 | $this->markTestSkipped( 'Please install Predis client first' ); |
| 165 | 168 | } |
| 166 | 169 | } |
@@ -4,16 +4,16 @@ |
||
| 4 | 4 | * Set error reporting to maximum |
| 5 | 5 | */ |
| 6 | 6 | error_reporting( -1 ); |
| 7 | -ini_set('display_errors', '1'); |
|
| 7 | +ini_set( 'display_errors', '1' ); |
|
| 8 | 8 | |
| 9 | 9 | |
| 10 | 10 | /* |
| 11 | 11 | * Set locale settings to reasonable defaults |
| 12 | 12 | */ |
| 13 | -setlocale(LC_ALL, 'en_US.UTF-8'); |
|
| 14 | -setlocale(LC_NUMERIC, 'POSIX'); |
|
| 15 | -setlocale(LC_CTYPE, 'en_US.UTF-8'); |
|
| 16 | -setlocale(LC_TIME, 'POSIX'); |
|
| 13 | +setlocale( LC_ALL, 'en_US.UTF-8' ); |
|
| 14 | +setlocale( LC_NUMERIC, 'POSIX' ); |
|
| 15 | +setlocale( LC_CTYPE, 'en_US.UTF-8' ); |
|
| 16 | +setlocale( LC_TIME, 'POSIX' ); |
|
| 17 | 17 | |
| 18 | 18 | |
| 19 | 19 | require_once 'TestHelper.php'; |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | foreach( $this->client->mget( $actkeys ) as $idx => $value ) |
| 154 | 154 | { |
| 155 | 155 | if( $value !== null && isset( $keys[$idx] ) ) { |
| 156 | - $result[ $keys[$idx] ] = $value; |
|
| 156 | + $result[$keys[$idx]] = $value; |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | $pipe = $this->client->pipeline(); |
| 221 | 221 | |
| 222 | 222 | foreach( $pairs as $key => $value ) { |
| 223 | - $actpairs[ $this->siteid . $key ] = $value; |
|
| 223 | + $actpairs[$this->siteid . $key] = $value; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | $pipe->mset( $actpairs ); |
@@ -36,14 +36,14 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function testClear() |
| 38 | 38 | { |
| 39 | - $this->mock->expects( $this->once() )->method( 'flushdb' )->will( $this->returnValue( 'OK') ); |
|
| 39 | + $this->mock->expects( $this->once() )->method( 'flushdb' )->will( $this->returnValue( 'OK' ) ); |
|
| 40 | 40 | $this->assertTrue( $this->object->clear() ); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
| 44 | 44 | public function testDelete() |
| 45 | 45 | { |
| 46 | - $this->mock->expects( $this->once() )->method( 'del' )->will( $this->returnValue( 'OK') ) |
|
| 46 | + $this->mock->expects( $this->once() )->method( 'del' )->will( $this->returnValue( 'OK' ) ) |
|
| 47 | 47 | ->with( $this->equalTo( array( '1-test' ) ) ); |
| 48 | 48 | |
| 49 | 49 | $this->assertTrue( $this->object->delete( 'test' ) ); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | public function testDeleteMultiple() |
| 54 | 54 | { |
| 55 | - $this->mock->expects( $this->once() )->method( 'del' )->will( $this->returnValue( 'OK') ) |
|
| 55 | + $this->mock->expects( $this->once() )->method( 'del' )->will( $this->returnValue( 'OK' ) ) |
|
| 56 | 56 | ->with( $this->equalTo( array( '1-test' ) ) ); |
| 57 | 57 | |
| 58 | 58 | $this->assertTrue( $this->object->deleteMultiple( array( 'test' ) ) ); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $this->mock->expects( $this->once() )->method( 'execute' ) |
| 70 | 70 | ->will( $this->returnValue( array( '1-tag:1' => array( '1-key:1', '1-key:2' ) ) ) ); |
| 71 | 71 | |
| 72 | - $this->mock->expects( $this->once() )->method( 'del' )->will( $this->returnValue( 'OK') ) |
|
| 72 | + $this->mock->expects( $this->once() )->method( 'del' )->will( $this->returnValue( 'OK' ) ) |
|
| 73 | 73 | ->with( $this->equalTo( array( '1-key:1', '1-key:2', '1-tag:tag1', '1-tag:tag2' ) ) ); |
| 74 | 74 | |
| 75 | 75 | $this->assertTrue( $this->object->deleteByTags( array( 'tag1', 'tag2' ) ) ); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $this->mock->expects( $this->exactly( 2 ) )->method( 'sadd' ); |
| 129 | 129 | |
| 130 | - $this->mock->expects( $this->once() )->method( 'execute' )->will( $this->returnValue( 'OK') ); |
|
| 130 | + $this->mock->expects( $this->once() )->method( 'execute' )->will( $this->returnValue( 'OK' ) ); |
|
| 131 | 131 | |
| 132 | 132 | $this->mock->expects( $this->once() )->method( 'expireat' ) |
| 133 | 133 | ->with( $this->equalTo( '1-t:1' ), $this->greaterThan( 0 ) ); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | $this->mock->expects( $this->exactly( 2 ) )->method( 'sadd' ); |
| 148 | 148 | |
| 149 | - $this->mock->expects( $this->once() )->method( 'execute' )->will( $this->returnValue( 'OK') ); |
|
| 149 | + $this->mock->expects( $this->once() )->method( 'execute' )->will( $this->returnValue( 'OK' ) ); |
|
| 150 | 150 | |
| 151 | 151 | $this->mock->expects( $this->once() )->method( 'expireat' ) |
| 152 | 152 | ->with( $this->equalTo( '1-t:1' ), $this->greaterThan( 0 ) ); |