Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Test/Case/Lib/DebugTimerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testTimers() {
$this->assertTrue($elapsed >= $expected);

DebugTimer::start('test3');
$this->assertIdentical(DebugTimer::elapsedTime('test3'), 0);
$this->assertEquals(DebugTimer::elapsedTime('test3'), 0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

$this->assertFalse(DebugTimer::stop('wrong'));
}

Expand Down
14 changes: 7 additions & 7 deletions Test/Case/Lib/FireCakeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function tearDown() {
public function testGetInstanceOverride() {
$instance = FireCake::getInstance();
$instance2 = FireCake::getInstance();
$this->assertReference($instance, $instance2);
$this->assertSame($instance, $instance2);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

$this->assertIsA($instance, 'FireCake');
$this->assertIsA($instance, 'TestFireCake', 'Stored instance is not a copy of TestFireCake, test case is broken.');
}
Expand Down Expand Up @@ -211,8 +211,8 @@ public function testTrace() {
$this->assertTrue(isset($this->firecake->sentHeaders['X-Wf-1-Plugin-1']));
$this->assertTrue(isset($this->firecake->sentHeaders['X-Wf-1-Structure-1']));
$dump = $this->firecake->sentHeaders['X-Wf-1-1-1-1'];
$this->assertPattern('/"Message":"myTrace"/', $dump);
$this->assertPattern('/"Trace":\[/', $dump);
$this->assertRegexp('/"Message":"myTrace"/', $dump);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

$this->assertRegexp('/"Trace":\[/', $dump);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

}

/**
Expand Down Expand Up @@ -255,8 +255,8 @@ public function testIncludeLineNumbers() {
FireCake::setOptions(array('includeLineNumbers' => true));
FireCake::info('Testing');
$result = $this->firecake->sentHeaders['X-Wf-1-1-1-1'];
$this->assertPattern('/"File"\:".*FireCakeTest.php/', $result);
$this->assertPattern('/"Line"\:\d+/', $result);
$this->assertRegexp('/"File"\:".*FireCakeTest.php/', $result);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

$this->assertRegexp('/"Line"\:\d+/', $result);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

}

/**
Expand Down Expand Up @@ -290,7 +290,7 @@ public function testFbParameterParsing() {
FireCake::fb('Test', 'Custom label', 'warn');
$this->assertEquals($this->firecake->sentHeaders['X-Wf-1-1-1-3'], '47|[{"Type":"WARN","Label":"Custom label"},"Test"]|');

$this->expectError('PHPUnit_Framework_Error');
$this->setExpectedException('PHPUnit_Framework_Error');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

$this->assertFalse(FireCake::fb('Test', 'Custom label', 'warn', 'more parameters'));

$this->assertEquals($this->firecake->sentHeaders['X-Wf-1-Index'], 3);
Expand Down Expand Up @@ -339,7 +339,7 @@ public function testNonNativeEncoding() {
$this->assertEquals($json, '[1,2,3]');

$json = FireCake::jsonEncode(FireCake::getInstance());
$this->assertPattern('/"options"\:\{"maxObjectDepth"\:\d*,/', $json);
$this->assertRegexp('/"options"\:\{"maxObjectDepth"\:\d*,/', $json);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

}

}
4 changes: 2 additions & 2 deletions Test/Case/View/Helper/FirePhpToolbarHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function testAfterLayout() {
public function testPanelStart() {
$this->Toolbar->panelStart('My Panel', 'my_panel');
$result = $this->firecake->sentHeaders;
$this->assertPattern('/GROUP_START.+My Panel/', $result['X-Wf-1-1-1-1']);
$this->assertRegexp('/GROUP_START.+My Panel/', $result['X-Wf-1-1-1-1']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

}

/**
Expand All @@ -147,6 +147,6 @@ public function testPanelStart() {
public function testPanelEnd() {
$this->Toolbar->panelEnd();
$result = $this->firecake->sentHeaders;
$this->assertPattern('/GROUP_END/', $result['X-Wf-1-1-1-1']);
$this->assertRegexp('/GROUP_END/', $result['X-Wf-1-1-1-1']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

}
}
4 changes: 2 additions & 2 deletions Test/Case/View/Helper/HtmlToolbarHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public function testInjectToolbar() {
$this->Controller->Components->trigger('beforeRender', array($this->Controller));
$result = $this->Controller->render();
$result = str_replace(array("\n", "\r"), '', $result);
$this->assertPattern('#<div id\="debug-kit-toolbar">.+</div>.*</body>#', $result);
$this->assertRegexp('#<div id\="debug-kit-toolbar">.+</div>.*</body>#', $result);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed

}

/**
Expand All @@ -360,7 +360,7 @@ public function testJavascriptInjection() {
$this->Controller->Components->trigger('beforeRender', array($this->Controller));
$result = $this->Controller->render();
$result = str_replace(array("\n", "\r"), '', $result);
$this->assertPattern('#<script\s*type="text/javascript"\s*src="/debug_kit/js/js_debug_toolbar.js(?:\?\d*?)?"\s*>\s?</script>#', $result);
$this->assertRegexp('#<script\s*type="text/javascript"\s*src="/debug_kit/js/js_debug_toolbar.js(?:\?\d*?)?"\s*>\s?</script>#', $result);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces must be used to indent lines; tabs are not allowed
Line exceeds 120 characters; contains 144 characters

}

/**
Expand Down