subject = new Factory(); } /** * @test */ public function createMustReturnInstanceOfCustomerConnectionWithValidIdentifierGiven() { $expectedInstance = $this->subject->create('customer'); self::assertInstanceOf(CustomerConnection::class, $expectedInstance); } /** * @test * @throws RuntimeException */ public function createMustThrowRuntimeExceptionIfInvalidIdentifierIsGiven() { $unexpectedInstance = $this->subject->create('fooBar'); self::expectException(RuntimeException::class); } }