/** @test **/ function it_builds_an_array_of_new_model_instances() { $repository = new UserRepository($this->newContainerMock(new User())); $users = $repository->build([['name' => 'Finn the Human', 'email' => '*****@*****.**'], ['name' => 'Jake the Dog', 'email' => '*****@*****.**']]); $this->assertEquals('Finn the Human', $users[0]->name); $this->assertEquals('*****@*****.**', $users[0]->email); $this->assertEquals('Jake the Dog', $users[1]->name); $this->assertEquals('*****@*****.**', $users[1]->email); $this->assertEquals(0, User::count()); }