|
|
@@ -5,7 +5,7 @@ namespace App\Tests\Service\Dolibarr;
|
|
|
use App\ApiResources\Dolibarr\DolibarrAccount;
|
|
|
use App\ApiResources\Dolibarr\DolibarrBill;
|
|
|
use App\ApiResources\Dolibarr\DolibarrContract;
|
|
|
-use App\Service\Dolibarr\DolibarrAccountCreator;
|
|
|
+use App\Service\ApiResourceBuilder\Dolibarr\DolibarrAccountBuilder;
|
|
|
use App\Service\Dolibarr\DolibarrApiService;
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
@@ -20,11 +20,11 @@ class DolibarrAccountCreatorTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see DolibarrAccountCreator::getDolibarrAccount()
|
|
|
+ * @see DolibarrAccountBuilder::getDolibarrAccount()
|
|
|
*/
|
|
|
public function testGetDolibarrAccount(): void
|
|
|
{
|
|
|
- $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountCreator::class)
|
|
|
+ $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountBuilder::class)
|
|
|
->setConstructorArgs([$this->dolibarrApiService])
|
|
|
->setMethodsExcept(['getDolibarrAccount'])
|
|
|
->getMock();
|
|
|
@@ -83,11 +83,11 @@ class DolibarrAccountCreatorTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see DolibarrAccountCreator::createDolibarrAccount()
|
|
|
+ * @see DolibarrAccountBuilder::createDolibarrAccount()
|
|
|
*/
|
|
|
public function testCreateDolibarrAccount(): void
|
|
|
{
|
|
|
- $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountCreator::class)
|
|
|
+ $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountBuilder::class)
|
|
|
->setConstructorArgs([$this->dolibarrApiService])
|
|
|
->setMethodsExcept(['createDolibarrAccount'])
|
|
|
->getMock();
|
|
|
@@ -104,11 +104,11 @@ class DolibarrAccountCreatorTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see DolibarrAccountCreator::createDolibarrAccount()
|
|
|
+ * @see DolibarrAccountBuilder::createDolibarrAccount()
|
|
|
*/
|
|
|
public function testCreateDolibarrAccountWithProduct(): void
|
|
|
{
|
|
|
- $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountCreator::class)
|
|
|
+ $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountBuilder::class)
|
|
|
->setConstructorArgs([$this->dolibarrApiService])
|
|
|
->setMethodsExcept(['createDolibarrAccount'])
|
|
|
->getMock();
|
|
|
@@ -122,11 +122,11 @@ class DolibarrAccountCreatorTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see DolibarrAccountCreator::createDolibarrContract()
|
|
|
+ * @see DolibarrAccountBuilder::createDolibarrContract()
|
|
|
*/
|
|
|
public function testCreateDolibarrContract(): void
|
|
|
{
|
|
|
- $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountCreator::class)
|
|
|
+ $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountBuilder::class)
|
|
|
->setConstructorArgs([$this->dolibarrApiService])
|
|
|
->setMethodsExcept(['createDolibarrContract'])
|
|
|
->getMock();
|
|
|
@@ -149,11 +149,11 @@ class DolibarrAccountCreatorTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see DolibarrAccountCreator::createDolibarrContractLine()
|
|
|
+ * @see DolibarrAccountBuilder::createDolibarrContractLine()
|
|
|
*/
|
|
|
public function testCreateDolibarrContractLine(): void
|
|
|
{
|
|
|
- $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountCreator::class)
|
|
|
+ $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountBuilder::class)
|
|
|
->setConstructorArgs([$this->dolibarrApiService])
|
|
|
->setMethodsExcept(['createDolibarrContractLine'])
|
|
|
->getMock();
|
|
|
@@ -178,12 +178,12 @@ class DolibarrAccountCreatorTest extends TestCase
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @see DolibarrAccountCreator::createDolibarrBill()
|
|
|
+ * @see DolibarrAccountBuilder::createDolibarrBill()
|
|
|
*/
|
|
|
public function testCreateDolibarrBill(): void
|
|
|
{
|
|
|
|
|
|
- $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountCreator::class)
|
|
|
+ $dolibarrAccountCreator = $this->getMockBuilder(DolibarrAccountBuilder::class)
|
|
|
->setConstructorArgs([$this->dolibarrApiService])
|
|
|
->setMethodsExcept(['createDolibarrBill'])
|
|
|
->getMock();
|