-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="true" | ||
syntaxCheck="false" | ||
> | ||
<testsuites> | ||
<testsuite name="Unit Test Suite"> | ||
<directory>./tests/unit/</directory> | ||
</testsuite> | ||
<testsuite name="Integration Test Suite"> | ||
<directory>./tests/integration/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
class FunctionsTest extends PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* @dataProvider providerIdentifiersTest | ||
* | ||
*/ | ||
public function testItCorrectlyImplodesIdentifiers($identifiers, $expected) | ||
{ | ||
$this->assertEquals($expected, \DbSync\implode_identifiers($identifiers)); | ||
} | ||
|
||
public function providerIdentifiersTest() | ||
{ | ||
return array( | ||
array(array('db.test', 'another.db', ), '`db`.`test`,`another`.`db`'), | ||
array(array('some`thing.e`lse'),'`some\`thing`.`e\`lse`'), | ||
); | ||
} | ||
} |