Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PHPUnit/Util/Log/VCR.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time)
public function startTest(PHPUnit_Framework_Test $test)
{
$class = get_class($test);
$method = $test->getName();
$method = $test->getName(false);

if (!method_exists($class, $method)) {
return;
Expand Down
19 changes: 19 additions & 0 deletions tests/PHPUnit/Util/Log/VCRTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,23 @@ public function testInterceptsWithAnnotations()
$result = file_get_contents('http://google.com');
$this->assertEquals('This is a annotation test dummy.', $result, 'Call was not intercepted (using annotations).');
}

/**
* @vcr unittest_annotation_test
* @dataProvider aDataProvider
*/
public function testInterceptsWithAnnotationsWhenUsingDataProvider($dummyValue)
{
// Content of tests/fixtures/unittest_annotation_test: "This is a annotation test dummy".
$result = file_get_contents('http://google.com');
$this->assertEquals('This is a annotation test dummy.', $result, 'Call was not intercepted (using annotations with data provider).');
}

public function aDataProvider()
{
return array(
array(1),
array(2)
);
}
}