categoryGateway = $this->createMock(CategoryGateway::class); $this->categoryHandler = new CategoryHandler($this->categoryGateway); $this->heskSettings = array(); } function testCreateCallsTheGatewayWithTheCategory() { //-- Arrange $category = new Category(); //-- Assert $this->categoryGateway->expects($this->once())->method('createCategory')->with($category, $this->heskSettings); //-- Act $this->categoryHandler->createCategory($category, $this->heskSettings); } }