Skip to content

Commit 07a579c

Browse files
committed
Fix CS.
1 parent ae438e7 commit 07a579c

File tree

4 files changed

+83
-83
lines changed

4 files changed

+83
-83
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ before_script:
4646

4747
script:
4848
- sh -c "if [ '$DEFAULT' = '1' ]; then phpunit; fi"
49-
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=vendor --ignore=docs . ; fi"
49+
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=vendor --ignore=docs --ignore=test_files . ; fi"
5050

5151
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then phpunit --coverage-clover=clover.xml || true; fi"
5252
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"

tests/TestCase/Mailer/EmailTest.php

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -8,74 +8,6 @@
88
use Tools\Mailer\Email;
99
use Tools\TestSuite\TestCase;
1010

11-
/**
12-
* Help to test Email
13-
*/
14-
class TestEmail extends Email {
15-
16-
/**
17-
* Wrap to protected method
18-
*
19-
* @param array $address
20-
* @return array
21-
*/
22-
public function formatAddress($address) {
23-
return parent::_formatAddress($address);
24-
}
25-
26-
/**
27-
* Wrap to protected method
28-
*
29-
* @param string $text
30-
* @param int $length
31-
* @return array
32-
*/
33-
public function wrap($text, $length = Email::LINE_LENGTH_MUST) {
34-
return parent::_wrap($text, $length);
35-
}
36-
37-
/**
38-
* Get the boundary attribute
39-
*
40-
* @return string
41-
*/
42-
public function getBoundary() {
43-
return $this->_boundary;
44-
}
45-
46-
/**
47-
* Encode to protected method
48-
*
49-
* @param string $text
50-
* @return string
51-
*/
52-
public function encode($text) {
53-
return $this->_encode($text);
54-
}
55-
56-
/**
57-
* Render to protected method
58-
*
59-
* @param string $content
60-
* @return array
61-
*/
62-
public function render($content) {
63-
return $this->_render($content);
64-
}
65-
66-
/**
67-
* TestEmail::getProtected()
68-
*
69-
* @param string $attribute
70-
* @return mixed
71-
*/
72-
public function getProtected($attribute) {
73-
$attribute = '_' . $attribute;
74-
return $this->$attribute;
75-
}
76-
77-
}
78-
7911
/**
8012
* EmailTest class
8113
*/
@@ -470,3 +402,71 @@ public function testWrapCustomized() {
470402
}
471403

472404
}
405+
406+
/**
407+
* Help to test Email
408+
*/
409+
class TestEmail extends Email {
410+
411+
/**
412+
* Wrap to protected method
413+
*
414+
* @param array $address
415+
* @return array
416+
*/
417+
public function formatAddress($address) {
418+
return parent::_formatAddress($address);
419+
}
420+
421+
/**
422+
* Wrap to protected method
423+
*
424+
* @param string $text
425+
* @param int $length
426+
* @return array
427+
*/
428+
public function wrap($text, $length = Email::LINE_LENGTH_MUST) {
429+
return parent::_wrap($text, $length);
430+
}
431+
432+
/**
433+
* Get the boundary attribute
434+
*
435+
* @return string
436+
*/
437+
public function getBoundary() {
438+
return $this->_boundary;
439+
}
440+
441+
/**
442+
* Encode to protected method
443+
*
444+
* @param string $text
445+
* @return string
446+
*/
447+
public function encode($text) {
448+
return $this->_encode($text);
449+
}
450+
451+
/**
452+
* Render to protected method
453+
*
454+
* @param string $content
455+
* @return array
456+
*/
457+
public function render($content) {
458+
return $this->_render($content);
459+
}
460+
461+
/**
462+
* TestEmail::getProtected()
463+
*
464+
* @param string $attribute
465+
* @return mixed
466+
*/
467+
public function getProtected($attribute) {
468+
$attribute = '_' . $attribute;
469+
return $this->$attribute;
470+
}
471+
472+
}

tests/TestCase/Model/Entity/EntityTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
use Cake\Core\Configure;
66
use Cake\ORM\TableRegistry;
7-
use Tools\Model\Entity\Entity;
87
use Tools\TestSuite\TestCase;
98

10-
class PasswordableBehaviorTest extends TestCase {
9+
class EntityTest extends TestCase {
1110

1211
/**
1312
* @var array
@@ -17,13 +16,11 @@ class PasswordableBehaviorTest extends TestCase {
1716
];
1817

1918
/**
20-
* @var \Tools\Model\Table\Table;
19+
* @var \Tools\Model\Table\Table
2120
*/
2221
public $Users;
2322

2423
/**
25-
* SetUp method
26-
*
2724
* @return void
2825
*/
2926
public function setUp() {
@@ -34,15 +31,16 @@ public function setUp() {
3431
$this->Users = TableRegistry::get('ToolsUsers');
3532
}
3633

34+
/**
35+
* @return void
36+
*/
3737
public function tearDown() {
3838
TableRegistry::clear();
3939

4040
parent::tearDown();
4141
}
4242

4343
/**
44-
* MyModelTest::testEnum()
45-
*
4644
* @return void
4745
*/
4846
public function testEnum() {

tests/TestCase/View/Helper/ObsfuscateHelperTest.php renamed to tests/TestCase/View/Helper/ObfuscateHelperTest.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,32 @@
88

99
class ObfuscateHelperTest extends TestCase {
1010

11+
/**
12+
* @return void
13+
*/
1114
public function setUp() {
1215
parent::setUp();
1316

1417
$this->Obfuscate = new ObfuscateHelper(new View());
1518
}
1619

20+
/**
21+
* @return void
22+
*/
1723
public function tearDown() {
1824
unset($this->Table);
1925

2026
parent::tearDown();
2127
}
2228

29+
/**
30+
* @return void
31+
*/
2332
public function testObject() {
2433
$this->assertInstanceOf('Tools\View\Helper\ObfuscateHelper', $this->Obfuscate);
2534
}
2635

27-
2836
/**
29-
* ObfuscateHelperTest::testEncodeEmails()
30-
*
3137
* @return void
3238
*/
3339
public function testEncodeEmail() {
@@ -37,8 +43,6 @@ public function testEncodeEmail() {
3743
}
3844

3945
/**
40-
* ObfuscateHelperTest::testEncodeEmailUrl()
41-
*
4246
* @return void
4347
*/
4448
public function testEncodeEmailUrl() {
@@ -48,8 +52,6 @@ public function testEncodeEmailUrl() {
4852
}
4953

5054
/**
51-
* ObfuscateHelperTest::testEncodeText()
52-
*
5355
* @return void
5456
*/
5557
public function testEncodeText() {

0 commit comments

Comments
 (0)