mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 22:59:52 +02:00
Run phpunit code quality rector
This commit is contained in:
parent
f215bd11cd
commit
f3ad3c1ffe
15 changed files with 66 additions and 70 deletions
|
@ -231,7 +231,7 @@ class AttachmentTest extends TestCase
|
|||
//Ensure that changing the external path does reset the internal one
|
||||
$attachment->setInternalPath('%MEDIA%/foo/bar.txt');
|
||||
$attachment->setExternalPath('https://example.de');
|
||||
$this->assertSame(null, $attachment->getInternalPath());
|
||||
$this->assertNull($attachment->getInternalPath());
|
||||
|
||||
//Ensure that setting the same value to the external path again doesn't reset the internal one
|
||||
$attachment->setExternalPath('https://google.de');
|
||||
|
|
|
@ -41,7 +41,7 @@ class PartTest extends TestCase
|
|||
$lot = new PartLot();
|
||||
$part->addPartLot($lot);
|
||||
$this->assertSame($part, $lot->getPart());
|
||||
$this->assertSame(1, $part->getPartLots()->count());
|
||||
$this->assertCount(1, $part->getPartLots());
|
||||
|
||||
//Remove element
|
||||
$part->removePartLot($lot);
|
||||
|
|
|
@ -38,7 +38,7 @@ class OrderdetailTest extends TestCase
|
|||
$pricedetail = new Pricedetail();
|
||||
$orderdetail->addPricedetail($pricedetail);
|
||||
$this->assertSame($orderdetail, $pricedetail->getOrderdetail());
|
||||
$this->assertSame(1, $orderdetail->getPricedetails()->count());
|
||||
$this->assertCount(1, $orderdetail->getPricedetails());
|
||||
|
||||
//After removal of the pricedetail, the orderdetail must be empty again
|
||||
$orderdetail->removePricedetail($pricedetail);
|
||||
|
|
|
@ -35,7 +35,7 @@ class ApiTokenTypeTest extends TestCase
|
|||
|
||||
public function testGetTypeFromToken(): void
|
||||
{
|
||||
$this->assertEquals(ApiTokenType::PERSONAL_ACCESS_TOKEN, ApiTokenType::getTypeFromToken('tcp_123'));
|
||||
$this->assertSame(ApiTokenType::PERSONAL_ACCESS_TOKEN, ApiTokenType::getTypeFromToken('tcp_123'));
|
||||
}
|
||||
|
||||
public function testGetTypeFromTokenInvalid(): void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue