Example #1
0
 public function test_adding_members_to_a_thread_via_multiple_arguments()
 {
     $this->expectsEvents(Parley\Events\ParleyThreadCreated::class);
     $aleksandr = User::create(['email' => '*****@*****.**']);
     $parley = Parley::discuss(['subject' => 'You are Invited', 'body' => "Please join us for dinner this evening at our residence.", 'author' => $this->prozorovGroup])->withParticipants($this->irina, $this->nikolai, $aleksandr);
     $members = $parley->getMembers();
     $this->assertEquals($members->count(), 4);
 }
Example #2
0
 /**
  * Setup the test environment, per the Orchestra\Testbench\TestCase documentation
  */
 public function setUp()
 {
     parent::setUp();
     // Prepare the sqlite database
     // http://www.chrisduell.com/blog/development/speeding-up-unit-tests-in-php/
     exec('cp ' . __DIR__ . '/_data/db/staging.sqlite ' . __DIR__ . '/_data/db/database.sqlite');
     // Establish the players in our dialogue
     // https://en.wikipedia.org/wiki/Three_Sisters_(play)
     $this->irina = User::create(['email' => '*****@*****.**', 'first_name' => 'Irina', 'last_name' => 'Prozorovna']);
     $this->nikolai = User::create(['email' => '*****@*****.**', 'first_name' => 'Nikolai', 'last_name' => 'Tuzenbach']);
     $this->prozorovGroup = Group::create(['name' => 'The Prozorovs']);
 }