mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-09 17:36:22 +02:00
PSR-0 for namespace and filename + tests
This commit is contained in:
28
Tests/FluentInterface/FluentInterfaceTest.php
Normal file
28
Tests/FluentInterface/FluentInterfaceTest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* DesignPatternPHP
|
||||
*/
|
||||
|
||||
namespace DesignPatterns\Tests\FluentInterface;
|
||||
|
||||
use DesignPatterns\FluentInterface\SQL;
|
||||
|
||||
/**
|
||||
* FluentInterfaceTest tests the fluent interface SQL
|
||||
*/
|
||||
class FluentInterfaceTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function testBuildSQL()
|
||||
{
|
||||
$instance = new SQL();
|
||||
$query = $instance->select(array('foo', 'bar'))
|
||||
->from('foobar', 'f')
|
||||
->where('f.bar = ?')
|
||||
->getQuery();
|
||||
|
||||
$this->assertEquals('SELECT foo,bar FROM foobar AS f WHERE f.bar = ?', $query);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user