Добавлен цикл проверки сайтов
This commit is contained in:
73
vendor/nilportugues/sql-query-builder/tests/Manipulation/UpdateTest.php
vendored
Normal file
73
vendor/nilportugues/sql-query-builder/tests/Manipulation/UpdateTest.php
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* Author: Nil Portugués Calderó <contact@nilportugues.com>
|
||||
* Date: 6/3/14
|
||||
* Time: 1:37 AM.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace NilPortugues\Tests\Sql\QueryBuilder\Manipulation;
|
||||
|
||||
use NilPortugues\Sql\QueryBuilder\Manipulation\Update;
|
||||
|
||||
/**
|
||||
* Class UpdateTest.
|
||||
*/
|
||||
class UpdateTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Update
|
||||
*/
|
||||
private $query;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->query = new Update();
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function itShouldGetPartName()
|
||||
{
|
||||
$this->assertSame('UPDATE', $this->query->partName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function itShouldReturnLimit1()
|
||||
{
|
||||
$this->query->limit(1);
|
||||
|
||||
$this->assertSame(1, $this->query->getLimitStart());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function itShouldReturnValues()
|
||||
{
|
||||
$values = ['user_id' => 1];
|
||||
|
||||
$this->query->setValues($values);
|
||||
|
||||
$this->assertSame($values, $this->query->getValues());
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
public function itShouldSetNullableValues()
|
||||
{
|
||||
$values = ['user_id' => 1, 'description' => null, 'isVisible' => false];
|
||||
|
||||
$this->query->setValues($values);
|
||||
|
||||
$this->assertSame($values, $this->query->getValues());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user