/** * @dataProvider providerLoadUser */ public function testLoadUser($uKey, $knownAs, $expectException) { try { // check its loaded correctly $u = InstructionControl::loadUser($uKey); $this->assertEquals($knownAs, $u['known_as']); $this->assertFalse($expectException, 'should have throw Exception'); } catch (InstructionControl_Exception $e) { $this->assertTrue($expectException, 'should not have throw Exception'); } }