public function testMatch() { $type = new BindingTypeDescriptor('vendor/type'); $type->load($this->package); $this->assertFalse($type->match(Expr::same('foobar', BindingTypeDescriptor::NAME))); $this->assertTrue($type->match(Expr::same('vendor/type', BindingTypeDescriptor::NAME))); $this->assertFalse($type->match(Expr::same('foobar', BindingTypeDescriptor::CONTAINING_PACKAGE))); $this->assertTrue($type->match(Expr::same($this->package->getName(), BindingTypeDescriptor::CONTAINING_PACKAGE))); $this->assertFalse($type->match(Expr::same(BindingTypeState::DUPLICATE, BindingTypeDescriptor::STATE))); $this->assertTrue($type->match(Expr::same(BindingTypeState::ENABLED, BindingTypeDescriptor::STATE))); }