Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/3729'
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ObjectPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
*/
class ObjectPluginManager extends AbstractPluginManager
{
/**
* @var bool Ensure services are not shared
*/
protected $shareByDefault = false;

/**
* Default set of barcode parsers
*
Expand Down
5 changes: 5 additions & 0 deletions src/RendererPluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
*/
class RendererPluginManager extends AbstractPluginManager
{
/**
* @var bool Ensure services are not shared
*/
protected $shareByDefault = false;

/**
* Default set of barcode renderers
*
Expand Down
6 changes: 6 additions & 0 deletions test/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ public function testBarcodeObjectFactoryWithBarcodeAsString()
{
$barcode = Barcode\Barcode::makeBarcode('code25');
$this->assertTrue($barcode instanceof Object\Code25);

// ensure makeBarcode creates unique instances
$this->assertNotSame($barcode, Barcode\Barcode::makeBarcode('code25'));
}

public function testBarcodeObjectFactoryWithBarcodeAsStringAndConfigAsArray()
Expand Down Expand Up @@ -263,6 +266,9 @@ public function testBarcodeRendererFactoryWithBarcodeAsString()
$this->checkGDRequirement();
$renderer = Barcode\Barcode::makeRenderer('image');
$this->assertTrue($renderer instanceof Renderer\Image);

// ensure unique instance is created
$this->assertNotSame($renderer, Barcode\Barcode::makeRenderer('image'));
}

public function testBarcodeRendererFactoryWithBarcodeAsStringAndConfigAsArray()
Expand Down

0 comments on commit 88be4ef

Please sign in to comment.