public function testJackingAHumanIncreasesTheCount()
 {
     $human = $this->getMock('Human', null, array(), 'MockHuman', null, false);
     $humanFactory = $this->getMock('HumanFactory');
     $humanFactory->expects($this->once())->method('create')->will($this->returnValue($human));
     $matrix = new Matrix();
     $matrix->setHumanFactory($humanFactory);
     $expectedCount = $matrix->count();
     $matrix->jackIn('robin');
     $this->assertEquals($expectedCount + 1, $matrix->count());
 }
 /**
  * @test
  * @covers Matrix::count
  */
 function canCount()
 {
     $matrix = new Matrix(array('jack' => new Human('jack', true), 'jill' => new Human('jill', true), 'someone else' => new Human('someone else', true)));
     $this->assertEquals(3, $matrix->count());
 }