-
Notifications
You must be signed in to change notification settings - Fork 565
fixes #591 #592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #591 #592
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,7 @@ public function tearDown() { | |
| public function testGetInstanceOverride() { | ||
| $instance = FireCake::getInstance(); | ||
| $instance2 = FireCake::getInstance(); | ||
| $this->assertReference($instance, $instance2); | ||
| $this->assertSame($instance, $instance2); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.'); | ||
| } | ||
|
|
@@ -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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -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'); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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); | ||
|
|
@@ -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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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']); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -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']); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
| } | ||
|
|
||
| /** | ||
|
|
@@ -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); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces must be used to indent lines; tabs are not allowed |
||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
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