for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Ifsnop\Mysqldump\Mysqldump;
class MysqldumpTest extends PHPUnit_Framework_TestCase
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/** @test */
public function tableSpecificWhereConditionsWork()
$dump = new Mysqldump('mysql:host=localhost;dbname=test', 'testing', 'testing', array(
'where' => 'defaultWhere'
));
If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:
someFunctionCall( $firstArgument, $secondArgument, $thirdArgument ); // Closing parenthesis on a new line.
$dump->setTableWheres(array(
'users' => 'date_registered > NOW() - INTERVAL 3 MONTH AND is_deleted=0',
'logs' => 'date_registered > NOW() - INTERVAL 1 DAY',
'posts' => 'active=1'
$this->assertEquals(
'date_registered > NOW() - INTERVAL 3 MONTH AND is_deleted=0',
$dump->getTableWhere('users')
);
'defaultWhere',
$dump->getTableWhere('non_overriden_table')
}
This check marks files that end in a newline character, i.e. an empy line.