updated-packages
This commit is contained in:
@@ -9,8 +9,11 @@
|
||||
* This source file is subject to the MIT license that is bundled
|
||||
* with this source code in the file LICENSE.
|
||||
*/
|
||||
|
||||
namespace Gitonomy\Git\Tests;
|
||||
|
||||
use Gitonomy\Git\Exception\RuntimeException;
|
||||
|
||||
class BlobTest extends AbstractTest
|
||||
{
|
||||
const README_FRAGMENT = 'Foo Bar project';
|
||||
@@ -27,15 +30,20 @@ class BlobTest extends AbstractTest
|
||||
{
|
||||
$blob = $this->getReadmeBlob($repository);
|
||||
|
||||
$this->assertContains(self::README_FRAGMENT, $blob->getContent());
|
||||
if (method_exists($this, 'assertStringContainsString')) {
|
||||
$this->assertStringContainsString(self::README_FRAGMENT, $blob->getContent());
|
||||
} else {
|
||||
$this->assertContains(self::README_FRAGMENT, $blob->getContent());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideFoobar
|
||||
* @expectedException RuntimeException
|
||||
*/
|
||||
public function testNotExisting($repository)
|
||||
{
|
||||
$this->expectException(RuntimeException::class);
|
||||
|
||||
$blob = $repository->getBlob('foobar');
|
||||
$blob->getContent();
|
||||
}
|
||||
@@ -46,7 +54,12 @@ class BlobTest extends AbstractTest
|
||||
public function testGetMimetype($repository)
|
||||
{
|
||||
$blob = $this->getReadmeBlob($repository);
|
||||
$this->assertRegexp('#text/plain#', $blob->getMimetype());
|
||||
|
||||
if (method_exists($this, 'assertMatchesRegularExpression')) {
|
||||
$this->assertMatchesRegularExpression('#text/plain#', $blob->getMimetype());
|
||||
} else {
|
||||
$this->assertRegExp('#text/plain#', $blob->getMimetype());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user