Fix imported ContainerInterface (#37334)
Co-authored-by: Viktor Szépe <viktor@szepe.net>
This commit is contained in:
parent
59a12a1868
commit
126187b794
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Corrects imported ContainerInterface. It was not replaced because of the leading backslash.
|
|
@ -6,7 +6,7 @@
|
|||
namespace Automattic\WooCommerce\Proxies;
|
||||
|
||||
use Automattic\WooCommerce\Internal\DependencyManagement\Definition;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Automattic\WooCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Proxy class to access legacy WooCommerce functionality.
|
||||
|
|
|
@ -32,7 +32,7 @@ class LegacyProxyTest extends \WC_Unit_Test_Case {
|
|||
*/
|
||||
public function test_get_instance_of_throws_when_trying_to_get_a_namespaced_class() {
|
||||
$this->expectException( \Exception::class );
|
||||
$this->expectExceptionMessage( 'The LegacyProxy class is not intended for getting instances of classes in the src directory, please use ' . Definition::INJECTION_METHOD . ' method injection or the instance of Psr\Container\ContainerInterface for that.' );
|
||||
$this->expectExceptionMessage( 'The LegacyProxy class is not intended for getting instances of classes in the src directory, please use ' . Definition::INJECTION_METHOD . ' method injection or the instance of Automattic\WooCommerce\Vendor\Psr\Container\ContainerInterface for that.' );
|
||||
|
||||
$this->sut->get_instance_of( DependencyClass::class );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue