Permalink
Browse files

Fix minor object parameter conflict with PHPUnit.

  • Loading branch information...
1 parent 199608d commit d34c95146748c794c2d7db7de79ca28bb98642e7 @reinink reinink committed Sep 28, 2014
Showing with 10 additions and 10 deletions.
  1. +10 −10 tests/Template/DataTest.php
@@ -4,42 +4,42 @@
class DataTest extends \PHPUnit_Framework_TestCase
{
- private $data;
+ private $template_data;
public function setUp()
{
- $this->data = new Data;
+ $this->template_data = new Data;
}
public function testCanCreateInstance()
{
- $this->assertInstanceOf('League\Plates\Template\Data', $this->data);
+ $this->assertInstanceOf('League\Plates\Template\Data', $this->template_data);
}
public function testAddData()
{
- $this->data->add(array('name' => 'Jonathan'));
- $data = $this->data->get();
+ $this->template_data->add(array('name' => 'Jonathan'));
+ $data = $this->template_data->get();
$this->assertEquals($data['name'], 'Jonathan');
}
public function testAddDataWithTemplate()
{
- $this->data->add(array('name' => 'Jonathan'), 'template');
- $data = $this->data->get('template');
+ $this->template_data->add(array('name' => 'Jonathan'), 'template');
+ $data = $this->template_data->get('template');
$this->assertEquals($data['name'], 'Jonathan');
}
public function testAddDataWithTemplates()
{
- $this->data->add(array('name' => 'Jonathan'), array('template1', 'template2'));
- $data = $this->data->get('template1');
+ $this->template_data->add(array('name' => 'Jonathan'), array('template1', 'template2'));
+ $data = $this->template_data->get('template1');
$this->assertEquals($data['name'], 'Jonathan');
}
public function testAddDataWithInvalidTemplateFileType()
{
$this->setExpectedException('LogicException', 'The templates variable must be null, an array or a string, integer given.');
- $this->data->add(array('name' => 'Jonathan'), 123);
+ $this->template_data->add(array('name' => 'Jonathan'), 123);
}
}

0 comments on commit d34c951

Please sign in to comment.