public function AssetReferenceTest::testMethods

@dataProvider getMethodAndRetVal

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Asset/AssetReferenceTest.php, line 30

Class

AssetReferenceTest

Namespace

Assetic\Test\Asset

Code

public function testMethods($method, $returnValue) {
  $asset = $this
    ->getMock('Assetic\\Asset\\AssetInterface');
  $this->am
    ->expects($this
    ->once())
    ->method('get')
    ->with('foo')
    ->will($this
    ->returnValue($asset));
  $asset
    ->expects($this
    ->once())
    ->method($method)
    ->will($this
    ->returnValue($returnValue));
  $this
    ->assertEquals($returnValue, $this->ref
    ->{$method}(), '->' . $method . '() returns the asset value');
}