Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Kinyakin committed May 14, 2015
1 parent 4fb64a7 commit 431c337
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"autoload": {
"psr-4": {
"rkgrep\\": "src/"
Expand Down
12 changes: 6 additions & 6 deletions tests/AttributableTest.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

require __DIR__ . '/stubs/Mock.php';
require_once __DIR__ . '/stubs/AttributableMock.php';

class AttributableTest extends PHPUnit_Framework_TestCase {

public function testConstruct()
{
$mock = new Mock();
$mock = new AttributableMock();
$this->assertEmpty($mock->toArray());
}

public function testSetAndGet()
{
$mock = new Mock();
$mock = new AttributableMock();

$mock->foo = 'bar';

Expand All @@ -23,7 +23,7 @@ public function testSetAndGet()

public function testIsset()
{
$mock = new Mock();
$mock = new AttributableMock();

$mock->foo = 'bar';
$this->assertTrue(isset($mock->foo));
Expand All @@ -32,7 +32,7 @@ public function testIsset()

public function testCall()
{
$mock = new Mock();
$mock = new AttributableMock();

$mock->foo();
$this->assertTrue($mock->get('foo'));
Expand All @@ -43,7 +43,7 @@ public function testCall()

public function testUnset()
{
$mock = new Mock();
$mock = new AttributableMock();
$mock['foo'] = 'bar';

unset($mock['foo']);
Expand Down
7 changes: 7 additions & 0 deletions tests/stubs/AttributableMock.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

class AttributableMock implements ArrayAccess, JsonSerializable {

use rkgrep\Attributable;

}
7 changes: 0 additions & 7 deletions tests/stubs/Mock.php

This file was deleted.

0 comments on commit 431c337

Please sign in to comment.