@@ -4,7 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | public static function suite() { |
| 6 | 6 | $suite = new CakeTestSuite('All lib tests.'); |
| 7 | - $suite->addTestDirectoryRecursive(TESTS . 'Case' . DS . 'Lib'); |
|
| 7 | + $suite->addTestDirectoryRecursive(TESTS.'Case'.DS.'Lib'); |
|
| 8 | 8 | return $suite; |
| 9 | 9 | } |
| 10 | 10 | |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public static function suite() { |
| 11 | 11 | $suite = new CakeTestSuite('All component class tests'); |
| 12 | 12 | |
| 13 | - $suite->addTestDirectoryRecursive(TESTS . DS . 'Case' . DS . 'Controller' . DS . 'Component'); |
|
| 13 | + $suite->addTestDirectoryRecursive(TESTS.DS.'Case'.DS.'Controller'.DS.'Component'); |
|
| 14 | 14 | return $suite; |
| 15 | 15 | } |
| 16 | 16 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | //= test 'class' input |
| 46 | 46 | $class = 'my_test_class foo'; |
| 47 | 47 | $expected = "<a href='localhost/entries/view/3' class='my_test_class foo'>Subject</a>"; |
| 48 | - $result = $this->EntryH->getFastLink($entry, array( 'class' => $class )); |
|
| 48 | + $result = $this->EntryH->getFastLink($entry, array('class' => $class)); |
|
| 49 | 49 | $this->assertEquals($expected, $result); |
| 50 | 50 | |
| 51 | 51 | //* test n/t posting |
@@ -22,14 +22,14 @@ |
||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function __get($name) { |
| 25 | - $property = '_' . $name; |
|
| 25 | + $property = '_'.$name; |
|
| 26 | 26 | if (property_exists($this, $property)) { |
| 27 | 27 | return $this->{$property}; |
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | public function __call($name, $arguments) { |
| 32 | - $method = '_' . $name; |
|
| 32 | + $method = '_'.$name; |
|
| 33 | 33 | if (is_callable([$this, $method])) { |
| 34 | 34 | return call_user_func_array([$this, $method], $arguments); |
| 35 | 35 | } |
@@ -12,8 +12,8 @@ discard block |
||
| 12 | 12 | */ |
| 13 | 13 | public function testIgnore() { |
| 14 | 14 | $entry = [ |
| 15 | - 'Entry' => [ 'id' => 1, 'tid' => 0, 'pid' => '0', 'subject' => 'a', 'text' => 'b', 'time' => 0, 'last_answer' => 0, 'fixed' => false, 'solves' => '', 'user_id' => 1 ], |
|
| 16 | - 'Category' => ['id' => 1, 'accession' => 0, 'description' => 'd', 'category' => 'c' ], |
|
| 15 | + 'Entry' => ['id' => 1, 'tid' => 0, 'pid' => '0', 'subject' => 'a', 'text' => 'b', 'time' => 0, 'last_answer' => 0, 'fixed' => false, 'solves' => '', 'user_id' => 1], |
|
| 16 | + 'Category' => ['id' => 1, 'accession' => 0, 'description' => 'd', 'category' => 'c'], |
|
| 17 | 17 | 'User' => ['id' => 1, 'username' => 'u'] |
| 18 | 18 | ]; |
| 19 | 19 | |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function testNesting() { |
| 39 | 39 | $entry = $entry1 = $entry2 = $entry3 = [ |
| 40 | - 'Entry' => [ 'id' => 1, 'tid' => 0, 'pid' => 0, 'subject' => 'a', 'text' => 'b', 'time' => 0, 'last_answer' => 0, 'fixed' => false, 'solves' => '', 'user_id' => 1 ], |
|
| 41 | - 'Category' => ['id' => 1, 'accession' => 0, 'description' => 'd', 'category' => 'c' ], |
|
| 40 | + 'Entry' => ['id' => 1, 'tid' => 0, 'pid' => 0, 'subject' => 'a', 'text' => 'b', 'time' => 0, 'last_answer' => 0, 'fixed' => false, 'solves' => '', 'user_id' => 1], |
|
| 41 | + 'Category' => ['id' => 1, 'accession' => 0, 'description' => 'd', 'category' => 'c'], |
|
| 42 | 42 | 'User' => ['username' => 'u'] |
| 43 | 43 | ]; |
| 44 | 44 | |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | $entry = [ |
| 105 | 105 | 'user_id' => 1, |
| 106 | 106 | 'locked' => false, |
| 107 | - 'time' => strftime( "%c", time() - ($this->editPeriod * 60) - 1) |
|
| 107 | + 'time' => strftime("%c", time() - ($this->editPeriod * 60) - 1) |
|
| 108 | 108 | ]; |
| 109 | 109 | $this->Mock->set('Entry', $entry); |
| 110 | 110 | $user = [ |
@@ -6,17 +6,17 @@ |
||
| 6 | 6 | $suite = new CakeTestSuite('All tests.'); |
| 7 | 7 | |
| 8 | 8 | //= core |
| 9 | - $suite->addTestDirectoryRecursive(TESTS . 'Case' . DS . 'Controller' . DS . 'Component'); |
|
| 10 | - $suite->addTestDirectory(TESTS . 'Case' . DS . 'Controller'); |
|
| 11 | - $suite->addTestDirectoryRecursive(TESTS . 'Case' . DS . 'Lib'); |
|
| 12 | - $suite->addTestDirectory(TESTS . 'Case' . DS . 'Model' . DS . 'Behavior'); |
|
| 13 | - $suite->addTestDirectory(TESTS . 'Case' . DS . 'Model'); |
|
| 14 | - $suite->addTestDirectory(TESTS . 'Case' . DS . 'View' . DS . 'Helper'); |
|
| 9 | + $suite->addTestDirectoryRecursive(TESTS.'Case'.DS.'Controller'.DS.'Component'); |
|
| 10 | + $suite->addTestDirectory(TESTS.'Case'.DS.'Controller'); |
|
| 11 | + $suite->addTestDirectoryRecursive(TESTS.'Case'.DS.'Lib'); |
|
| 12 | + $suite->addTestDirectory(TESTS.'Case'.DS.'Model'.DS.'Behavior'); |
|
| 13 | + $suite->addTestDirectory(TESTS.'Case'.DS.'Model'); |
|
| 14 | + $suite->addTestDirectory(TESTS.'Case'.DS.'View'.DS.'Helper'); |
|
| 15 | 15 | |
| 16 | 16 | //= plugins |
| 17 | - $suite->addTestDirectoryRecursive(CakePlugin::path('Api') . 'Test'); |
|
| 18 | - $suite->addTestDirectoryRecursive(CakePlugin::path('BbcodeParser') . 'Test'); |
|
| 19 | - $suite->addTestDirectoryRecursive(CakePlugin::path('Sitemap') . 'Test'); |
|
| 17 | + $suite->addTestDirectoryRecursive(CakePlugin::path('Api').'Test'); |
|
| 18 | + $suite->addTestDirectoryRecursive(CakePlugin::path('BbcodeParser').'Test'); |
|
| 19 | + $suite->addTestDirectoryRecursive(CakePlugin::path('Sitemap').'Test'); |
|
| 20 | 20 | |
| 21 | 21 | return $suite; |
| 22 | 22 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | $this->click("//input[@value='Login']"); |
| 22 | 22 | $this->waitForPageToLoad("30000"); |
| 23 | 23 | $this->assertTrue( |
| 24 | - (bool)preg_match( |
|
| 24 | + (bool) preg_match( |
|
| 25 | 25 | '/^[\s\S]*$/', |
| 26 | 26 | $this->getCookieByName($cookieName) |
| 27 | 27 | ) |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $this->assertTrue($this->isElementPresent("//div[@class='btn-strip-back']")); |
| 26 | 26 | |
| 27 | 27 | // try to answer to posting |
| 28 | - $this->click("forum_answer_" . $thread->getId()); |
|
| 28 | + $this->click("forum_answer_".$thread->getId()); |
|
| 29 | 29 | // waitForElementPresent ajax call |
| 30 | - for ($second = 0;; $second++) { |
|
| 30 | + for ($second = 0; ; $second++) { |
|
| 31 | 31 | if ($second >= 60) { |
| 32 | 32 | $this->fail("timeout"); |
| 33 | 33 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $answer[1] = $thread->getId() + 1; |
| 46 | 46 | |
| 47 | 47 | // check if we are redirected to new entry in mix view |
| 48 | - $this->assertEquals($this->browserUrl . 'entries/mix/' . $thread->getId() . '#' . $answer[1], |
|
| 48 | + $this->assertEquals($this->browserUrl.'entries/mix/'.$thread->getId().'#'.$answer[1], |
|
| 49 | 49 | $this->getLocation()); |
| 50 | 50 | |
| 51 | 51 | $thread->removeThread(); |