Skip to content

Commit

Permalink
Merge branch '2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Dec 19, 2013
2 parents a053a49 + f4520ae commit 4f2e543
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
16 changes: 0 additions & 16 deletions src/Orchestra/Widget/Drivers/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,6 @@ public function getItems()
return $this->nesty->getItems();
}

/**
* Magic method to get all items.
*
* @param string $key
* @return mixed
* @throws \InvalidArgumentException
*/
public function __get($key)
{
if ($key !== 'items') {
throw new InvalidArgumentException("Access to [{$key}] is not allowed.");
}

return $this->getItems();
}

/**
* Get the number of items for the current page.
*
Expand Down
11 changes: 0 additions & 11 deletions tests/Drivers/DriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public function testGetItemMethod()
$stub = new DriverStub('foo', array());

$this->assertInstanceOf('\Illuminate\Support\Collection', $stub->getItems());
$this->assertInstanceOf('\Illuminate\Support\Collection', $stub->items);
$this->assertNull($stub->is('foo'));

$stub->add('foobar')->hello('world');
Expand All @@ -63,16 +62,6 @@ public function testGetItemMethod()

$this->assertEquals($expected, $stub->is('foobar'));
}

/**
* Test Orchestra\Widget\Drivers\Driver::__get() throws an exception.
*
* @expectedException \InvalidArgumentException
*/
public function testMagicMethodGetThrowsException()
{
with(new DriverStub('foo', array()))->helloWorld;
}
}

class DriverStub extends \Orchestra\Widget\Drivers\Driver
Expand Down

0 comments on commit 4f2e543

Please sign in to comment.