Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
tests - apply method_argument_space fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus authored and Ocramius committed Dec 16, 2014
1 parent 7f1be74 commit b5d6d80
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions test/Helper/CycleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function testTwoCycles()
{
$this->helper->assign(array(5, 8, 3));
$this->assertEquals(5, (string) $this->helper->next());
$this->assertEquals(2, (string) $this->helper->__invoke(array(2,38,1),'cycle2')->next());
$this->assertEquals(2, (string) $this->helper->__invoke(array(2, 38, 1), 'cycle2')->next());
$this->assertEquals(8, (string) $this->helper->__invoke()->next());
$this->assertEquals(38, (string) $this->helper->setName('cycle2')->next());
}
Expand All @@ -124,7 +124,7 @@ public function testTwoCyclesInLoop()
$expected2 = array(7,34,8,6);
for ($i=0;$i<4;$i++) {
$this->assertEquals($expected[$i], (string) $this->helper->__invoke($expected)->next());
$this->assertEquals($expected2[$i], (string) $this->helper->__invoke($expected2,'cycle2')->next());
$this->assertEquals($expected2[$i], (string) $this->helper->__invoke($expected2, 'cycle2')->next());
}
}
}
12 changes: 6 additions & 6 deletions test/Helper/HeadLinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public function testTurnOffAutoEscapeDoesNotEncodeAmpersand()

public function testSetAlternateWithExtras()
{
$this->helper->setAlternate('/mydocument.pdf', 'application/pdf', 'foo', array('media' => array('print','screen')));
$this->helper->setAlternate('/mydocument.pdf', 'application/pdf', 'foo', array('media' => array('print', 'screen')));
$test = $this->helper->toString();
$this->assertContains('media="print,screen"', $test);
}
Expand All @@ -387,7 +387,7 @@ public function testAppendStylesheetWithExtras()

public function testSetStylesheetWithMediaAsArray()
{
$this->helper->appendStylesheet('/bar/baz', array('screen','print'));
$this->helper->appendStylesheet('/bar/baz', array('screen', 'print'));
$test = $this->helper->toString();
$this->assertContains(' media="screen,print"', $test);
}
Expand All @@ -413,10 +413,10 @@ public function testSetNextRelationship()
*/
public function testContainerMaintainsCorrectOrderOfItems()
{
$this->helper->__invoke()->offsetSetStylesheet(1,'/test1.css');
$this->helper->__invoke()->offsetSetStylesheet(10,'/test2.css');
$this->helper->__invoke()->offsetSetStylesheet(20,'/test3.css');
$this->helper->__invoke()->offsetSetStylesheet(5,'/test4.css');
$this->helper->__invoke()->offsetSetStylesheet(1, '/test1.css');
$this->helper->__invoke()->offsetSetStylesheet(10, '/test2.css');
$this->helper->__invoke()->offsetSetStylesheet(20, '/test3.css');
$this->helper->__invoke()->offsetSetStylesheet(5, '/test4.css');

$test = $this->helper->toString();

Expand Down
4 changes: 2 additions & 2 deletions test/PhpRendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,13 @@ public function testSharedInstanceHelper()
$helpers = $this->renderer->getHelperPluginManager();
$helpers->setInvokableClass('sharedinstance', 'ZendTest\View\TestAsset\SharedInstance');

$helpers->setShared('sharedinstance',false);
$helpers->setShared('sharedinstance', false);
// new instance always created when shared = false
$this->assertEquals(1, $this->renderer->sharedinstance());
$this->assertEquals(1, $this->renderer->sharedinstance());
$this->assertEquals(1, $this->renderer->sharedinstance());

$helpers->setShared('sharedinstance',true);
$helpers->setShared('sharedinstance', true);
// use shared instance when shared = true
$this->assertEquals(1, $this->renderer->sharedinstance());
$this->assertEquals(2, $this->renderer->sharedinstance());
Expand Down

0 comments on commit b5d6d80

Please sign in to comment.