mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Fix code style
This commit is contained in:
parent
f4388c8907
commit
510546d054
3 changed files with 3 additions and 23 deletions
|
@ -61,7 +61,7 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->cacheProvider->expects(self::at(1))->method('doFetch')
|
$this->cacheProvider->expects(self::at(1))->method('doFetch')
|
||||||
->with('namespaceTest[keyTest][1]')->willReturn(false);
|
->with('namespaceTest[keyTest][1]')->willReturn(false);
|
||||||
|
|
||||||
$callback = function($cache, $key) {
|
$callback = function ($cache, $key) {
|
||||||
return [$cache instanceof Adapter, $key];
|
return [$cache instanceof Adapter, $key];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@ class AdapterTest extends \PHPUnit_Framework_TestCase
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$platformMock = $this->getMock(AbstractPlatform::class, ['getName', 'quoteIdentifier', 'quoteValue']);
|
$platformMock = $this->getMock(AbstractPlatform::class, ['getName', 'quoteIdentifier', 'quoteValue']);
|
||||||
$platformMock->method('quoteIdentifier')->willReturnCallback(function($v) { return '`' . $v . '`'; });
|
$platformMock->method('quoteIdentifier')->willReturnCallback(function ($v) { return '`' . $v . '`'; });
|
||||||
$platformMock->method('quoteValue')->willReturnCallback(function($v) {
|
$platformMock->method('quoteValue')->willReturnCallback(function ($v) {
|
||||||
if (is_int($v)) {
|
if (is_int($v)) {
|
||||||
return $v;
|
return $v;
|
||||||
} elseif ($v instanceof \DateTime) {
|
} elseif ($v instanceof \DateTime) {
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace TorrentPier\Db;
|
|
||||||
|
|
||||||
class EntityTest extends \PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @covers TorrentPier\Db\Entity::table
|
|
||||||
*/
|
|
||||||
public function testGetTableName()
|
|
||||||
{
|
|
||||||
$model = new Model();
|
|
||||||
static::assertEquals('table name', $model->table());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Model extends Entity
|
|
||||||
{
|
|
||||||
protected $table = 'table name';
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue