Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Dec 22, 2016
1 parent d42104a commit 3244db9
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
2 changes: 2 additions & 0 deletions tests/TestCase/View/Helper/FlashHelperTest.php
Expand Up @@ -23,6 +23,8 @@

/**
* FlashHelperTest class
*
* @property \Cake\View\Helper\FlashHelper $Flash
*/
class FlashHelperTest extends TestCase
{
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/View/Helper/FormHelperTest.php
Expand Up @@ -108,7 +108,7 @@ public function initialize(array $config)
/**
* FormHelperTest class
*
* @property FormHelper $Form
* @property \Cake\View\Helper\FormHelper $Form
*/
class FormHelperTest extends TestCase
{
Expand Down Expand Up @@ -250,7 +250,7 @@ public function testAddWidgetAndRenderWidget()
'val' => 1
];
$mock = $this->getMockBuilder('Cake\View\Widget\WidgetInterface')->getMock();
$this->assertNull($this->Form->addWidget('test', $mock));
$this->Form->addWidget('test', $mock);
$mock->expects($this->once())
->method('render')
->with($data)
Expand All @@ -272,7 +272,7 @@ public function testOrderForRenderingWidgetAndFetchingSecureFields()
'name' => 'test'
];
$mock = $this->getMockBuilder('Cake\View\Widget\WidgetInterface')->getMock();
$this->assertNull($this->Form->addWidget('test', $mock));
$this->Form->addWidget('test', $mock);

$mock->expects($this->at(0))
->method('render')
Expand Down
5 changes: 5 additions & 0 deletions tests/TestCase/View/Helper/RssHelperTest.php
Expand Up @@ -28,6 +28,11 @@
class RssHelperTest extends TestCase
{

/**
* @var \Cake\View\Helper\RssHelper
*/
public $Rss;

/**
* setUp method
*
Expand Down
7 changes: 6 additions & 1 deletion tests/TestCase/View/Helper/TextHelperTest.php
Expand Up @@ -50,6 +50,11 @@ class StringMock
class TextHelperTest extends TestCase
{

/**
* @var \Cake\View\Helper\TextHelper
*/
public $Text;

/**
* setUp method
*
Expand Down Expand Up @@ -450,7 +455,7 @@ public function testAutoLinkUrlsQueryString()
/**
* Data provider for autoLinkEmail.
*
* @return void
* @return array
*/
public function autoLinkEmailProvider()
{
Expand Down
14 changes: 11 additions & 3 deletions tests/TestCase/View/Helper/TimeHelperTest.php
Expand Up @@ -27,7 +27,15 @@
class TimeHelperTest extends TestCase
{

public $Time = null;
/**
* @var \Cake\View\Helper\TimeHelper
*/
public $Time;

/**
* @var string
*/
public $locale;

/**
* setUp method
Expand Down Expand Up @@ -183,7 +191,7 @@ public function testNiceOutputTimezone()
*/
public function testToUnix()
{
$this->assertSame(1397980800, $this->Time->toUnix('2014-04-20 08:00:00'));
$this->assertSame('1397980800', $this->Time->toUnix('2014-04-20 08:00:00'));
}

/**
Expand Down Expand Up @@ -599,7 +607,7 @@ public function testFormatTimeInstance()
*/
public function assertTimeFormat($expected, $result)
{
return $this->assertEquals(
$this->assertEquals(
str_replace([',', '(', ')', ' at', ' à'], '', $expected),
str_replace([',', '(', ')', ' at', ' à'], '', $result)
);
Expand Down
5 changes: 5 additions & 0 deletions tests/TestCase/View/Helper/UrlHelperTest.php
Expand Up @@ -28,6 +28,11 @@
class UrlHelperTest extends TestCase
{

/**
* @var \Cake\View\Helper\UrlHelper
*/
public $Helper;

/**
* setUp method
*
Expand Down

0 comments on commit 3244db9

Please sign in to comment.