-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
c9e5bac
commit 3fee31d
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
bootstrap="vendor/autoload.php" | ||
> | ||
<testsuites> | ||
<testsuite name="Test Suite"> | ||
<directory>./test/</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
namespace Communibase; | ||
|
||
/** | ||
* @package Communibase | ||
* @author Kingsquare (source@kingsquare.nl) | ||
* @copyright Copyright (c) Kingsquare BV (http://www.kingsquare.nl) | ||
*/ | ||
class FinalizeTest extends \PHPUnit_Framework_TestCase { | ||
|
||
/** | ||
* @TODO Test schould also check the reversed. | ||
* @expectedException Exception | ||
* @expectedExceptionMessage Cannot call finalize on Person | ||
*/ | ||
public function testFinalizeCallIsPossibleForInvoiceOnly() { | ||
$stub = $this->getMockBuilder('Communibase\Connector') | ||
->setMethods(null) | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
|
||
// must throw exception | ||
$stub->finalize('Person', 'id'); | ||
} | ||
|
||
} |