mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-24 03:49:31 +00:00
Fixed typos
This commit is contained in:
parent
63df16a369
commit
d04d743520
144 changed files with 263 additions and 265 deletions
|
|
@ -42,7 +42,7 @@ class AttachmentPathResolverTest extends WebTestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
|
||||
$this->projectDir_orig = realpath(self::$kernel->getProjectDir());
|
||||
|
|
@ -117,7 +117,7 @@ class AttachmentPathResolverTest extends WebTestCase
|
|||
//Every kind of absolute path, that is not based with our placeholder dirs must be invald
|
||||
['/etc/passwd', null],
|
||||
['C:\\not\\existing.txt', null],
|
||||
//More then one placeholder is not allowed
|
||||
//More than one placeholder is not allowed
|
||||
[$this->footprint_path.'/test/'.$this->footprint_path, null],
|
||||
//Path must begin with path
|
||||
['/not/root'.$this->footprint_path, null],
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class AttachmentURLGeneratorTest extends WebTestCase
|
|||
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
self::$service = self::getContainer()->get(AttachmentURLGenerator::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class BuiltinAttachmentsFinderTest extends WebTestCase
|
|||
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
self::$service = self::getContainer()->get(BuiltinAttachmentsFinder::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class AmountFormatterTest extends WebTestCase
|
|||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(AmountFormatter::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,14 +38,14 @@ class BOMImporterTest extends WebTestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(BOMImporter::class);
|
||||
}
|
||||
|
||||
public function testImportFileIntoProject(): void
|
||||
{
|
||||
$inpute = $input = <<<CSV
|
||||
$input = <<<CSV
|
||||
"ID";"Bezeichner";"Footprint";"Stückzahl";"Bezeichnung";"Anbieter und Referenz";
|
||||
1;"R19,R17";"R_0805_2012Metric_Pad1.20x1.40mm_HandSolder";2;"4.7k";Test;;
|
||||
2;"D1";"D_DO-41_SOD81_P10.16mm_Horizontal";1;"1N5059";;;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class EntityImporterTest extends WebTestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(EntityImporter::class);
|
||||
}
|
||||
|
|
@ -112,7 +112,7 @@ EOT;
|
|||
$parent = new AttachmentType();
|
||||
$results = $this->service->massCreation($input, AttachmentType::class, $parent, $errors);
|
||||
|
||||
//We have 7 elements, an now errros
|
||||
//We have 7 elements, and 0 errors
|
||||
$this->assertCount(0, $errors);
|
||||
$this->assertCount(7, $results);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class LabelTextReplacerTest extends WebTestCase
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(LabelTextReplacer::class);
|
||||
|
||||
|
|
|
|||
|
|
@ -139,5 +139,7 @@ class SandboxedTwigProviderTest extends WebTestCase
|
|||
'lot' => new PartLot(),
|
||||
'location' => new Storelocation(),
|
||||
]);
|
||||
|
||||
$this->assertIsString($str);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class EventCommentHelperTest extends WebTestCase
|
|||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(EventCommentHelper::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class EventLoggerTest extends WebTestCase
|
|||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(EventLogger::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class FAIconGeneratorTest extends WebTestCase
|
|||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(FAIconGenerator::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class ParameterExtractorTest extends WebTestCase
|
|||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(ParameterExtractor::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class PartLotWithdrawAddHelperTest extends WebTestCase
|
|||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(PartLotWithdrawAddHelper::class);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class PricedetailHelperTest extends WebTestCase
|
|||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(PricedetailHelper::class);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class TreeViewGeneratorTest extends WebTestCase
|
|||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(TreeViewGenerator::class);
|
||||
$this->em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
|
@ -99,7 +99,7 @@ class TreeViewGeneratorTest extends WebTestCase
|
|||
//First element should link to new category
|
||||
$this->assertStringContainsStringIgnoringCase('New', $tree[0]->getText());
|
||||
$this->assertSame('/en/category/new', $tree[0]->getHref());
|
||||
//By default the new element node is selected
|
||||
//By default, the new element node is selected
|
||||
$this->assertTrue($tree[0]->getState()->getSelected());
|
||||
|
||||
//Next element is spacing
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class PermissionManagerTest extends WebTestCase
|
|||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
//Get an service instance.
|
||||
//Get a service instance.
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(PermissionManager::class);
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ class PermissionManagerTest extends WebTestCase
|
|||
|
||||
public function testInherit(): void
|
||||
{
|
||||
//Not inherited values should be same as dont inherit:
|
||||
//Not inherited values should be same as don't inherit:
|
||||
$this->assertTrue($this->service->inherit($this->user, 'parts', 'read'));
|
||||
$this->assertFalse($this->service->inherit($this->user, 'parts', 'edit'));
|
||||
//When thing can not be resolved null should be returned
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ class PermissionSchemaUpdaterTest extends WebTestCase
|
|||
$perm_data->setPermissionValue('parts', 'edit', PermissionData::ALLOW);
|
||||
$user = new TestPermissionHolder($perm_data);
|
||||
|
||||
//Do an upgrade and afterwards the move, add, and withdraw permissions should be set to ALLOW
|
||||
//Do an upgrade and afterward the move, add, and withdraw permissions should be set to ALLOW
|
||||
self::assertTrue($this->service->upgradeSchema($user, 1));
|
||||
self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'move'));
|
||||
self::assertEquals(PermissionData::ALLOW, $user->getPermissions()->getPermissionValue('parts_stock', 'add'));
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ class BackupCodeManagerTest extends WebTestCase
|
|||
{
|
||||
$user = new User();
|
||||
|
||||
//By default nothing other 2FA is activated, so the backup codes should be disabled
|
||||
//By default, nothing other 2FA is activated, so the backup codes should be disabled
|
||||
$codes = ['aaaa', 'bbbb'];
|
||||
$user->setBackupCodes($codes);
|
||||
$this->service->disableBackupCodesIfUnused($user);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue