Skip to content
Permalink
Browse files

Fix tests.

  • Loading branch information...
dereuromark committed Dec 22, 2016
1 parent d42104a commit 3244db9db9ca8e711cc19db3c0db4970fc4e9945
@@ -23,6 +23,8 @@
/**
* FlashHelperTest class
*
* @property \Cake\View\Helper\FlashHelper $Flash
*/
class FlashHelperTest extends TestCase
{
@@ -108,7 +108,7 @@ public function initialize(array $config)
/**
* FormHelperTest class
*
* @property FormHelper $Form
* @property \Cake\View\Helper\FormHelper $Form
*/
class FormHelperTest extends TestCase
{
@@ -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)
@@ -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')
@@ -28,6 +28,11 @@
class RssHelperTest extends TestCase
{
/**
* @var \Cake\View\Helper\RssHelper
*/
public $Rss;
/**
* setUp method
*
@@ -50,6 +50,11 @@ class StringMock
class TextHelperTest extends TestCase
{
/**
* @var \Cake\View\Helper\TextHelper
*/
public $Text;
/**
* setUp method
*
@@ -450,7 +455,7 @@ public function testAutoLinkUrlsQueryString()
/**
* Data provider for autoLinkEmail.
*
* @return void
* @return array
*/
public function autoLinkEmailProvider()
{
@@ -27,7 +27,15 @@
class TimeHelperTest extends TestCase
{
public $Time = null;
/**
* @var \Cake\View\Helper\TimeHelper
*/
public $Time;
/**
* @var string
*/
public $locale;
/**
* setUp method
@@ -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'));
}
/**
@@ -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)
);
@@ -28,6 +28,11 @@
class UrlHelperTest extends TestCase
{
/**
* @var \Cake\View\Helper\UrlHelper
*/
public $Helper;
/**
* setUp method
*

0 comments on commit 3244db9

Please sign in to comment.
You can’t perform that action at this time.