Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #32

Merged
merged 3 commits into from
Feb 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions fixtures/Functional/TestBundle/Bundle/ABundle/Entity/Aentity.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,15 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Aentity
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @return int|null
*/
public function getId()
public function getId() : ?int
{
return $this->id;
}
Expand Down
19 changes: 5 additions & 14 deletions fixtures/Functional/TestBundle/Bundle/BBundle/Entity/Bentity.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,15 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Bentity
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @return int|null
*/
public function getId()
public function getId() : ?int
{
return $this->id;
}
Expand Down
36 changes: 8 additions & 28 deletions fixtures/Functional/TestBundle/Entity/Brand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,51 +16,31 @@
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Brand
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @var string
*
* @ORM\Column(type="string", length=100)
*/
#[ORM\Column(type: 'string', length: 100)]
protected $name;

/**
* @var ArrayCollection
*
* @ORM\OneToMany(targetEntity="Product", mappedBy="brand")
*/
#[ORM\OneToMany(targetEntity: 'Product', mappedBy: 'brand')]
protected $products;

public function __construct()
{
$this->products = new ArrayCollection();
}

/**
* @return int|null
*/
public function getId()
public function getId() : ?int
{
return $this->id;
}

/**
* @return string|null
*/
public function getName()
public function getName() : ?string
{
return $this->name;
}
Expand Down
19 changes: 5 additions & 14 deletions fixtures/Functional/TestBundle/Entity/Dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,15 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Dev
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @return int|null
*/
public function getId()
public function getId() : ?int
{
return $this->id;
}
Expand Down
19 changes: 5 additions & 14 deletions fixtures/Functional/TestBundle/Entity/Inte.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,15 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Inte
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @return int|null
*/
public function getId()
public function getId() : ?int
{
return $this->id;
}
Expand Down
19 changes: 5 additions & 14 deletions fixtures/Functional/TestBundle/Entity/Prod.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,15 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Prod
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @return int|null
*/
public function getId()
public function getId() : ?int
{
return $this->id;
}
Expand Down
32 changes: 9 additions & 23 deletions fixtures/Functional/TestBundle/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,25 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Product
{
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @ORM\Column(type="string", length=100)
*/
#[ORM\Column(type: 'string', length: 100)]
protected $name;

/**
* @ORM\Column(type="decimal", scale=2)
*/
#[ORM\Column(type: 'decimal', scale: 2)]
protected $price;

/**
* @ORM\Column(type="text")
*/
#[ORM\Column(type: 'text')]
protected $description;

/**
* @var Brand
*
* @ORM\ManyToOne(targetEntity="Brand", inversedBy="products")
* @ORM\JoinColumn(name="brand_id", referencedColumnName="id")
*/
#[ORM\ManyToOne(targetEntity: 'Brand', inversedBy: 'products')]
#[ORM\JoinColumn(name: 'brand_id', referencedColumnName: 'id')]
protected $brand;

public function getBrand(): Brand
Expand Down
19 changes: 5 additions & 14 deletions fixtures/Functional/TestBundle/Entity/Shard.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,15 @@

use Doctrine\ORM\Mapping as ORM;

/**
* @ORM\Entity
*/
#[ORM\Entity]
class Shard
{
/**
* @var int
*
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;

/**
* @return int|null
*/
public function getId()
public function getId() : ?int
{
return $this->id;
}
Expand Down
24 changes: 0 additions & 24 deletions fixtures/Functional/bootstrap.php

This file was deleted.

2 changes: 0 additions & 2 deletions fixtures/Functional/config/test/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ parameters:
framework:
secret: test
test: ~
annotations:
cache: file
http_method_override: false

services:
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="fixtures/Functional/bootstrap.php"
colors="true"
forceCoversAnnotation="true"
verbose="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

/**
* @coversNothing
*
* @group legacy
*/
class LoadDataFixturesCommandIntegrationTest extends TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

/**
* @covers \Hautelook\AliceBundle\Console\Command\Doctrine\DoctrineOrmLoadDataFixturesCommand
*
* @group legacy
*/
class LoadDataFixturesCommandTest extends TestCase
Expand Down
1 change: 1 addition & 0 deletions tests/PhpUnit/RecreateDatabaseTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* @author Gary PEGEOT <[email protected]>
*
* @coversNothing
*/
class RecreateDatabaseTraitTest extends KernelTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/PhpUnit/RefreshDatabaseTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* @author Kévin Dunglas <[email protected]>
*
* @coversNothing
*/
class RefreshDatabaseTraitTest extends KernelTestCase
Expand Down
1 change: 1 addition & 0 deletions tests/PhpUnit/ReloadDatabaseTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* @author Kévin Dunglas <[email protected]>
*
* @coversNothing
*/
class ReloadDatabaseTraitTest extends KernelTestCase
Expand Down