function testNoSpaces() { $r = new Rule_UserName(); $this->assertFalse($r->noSpaces("user test")); $this->assertFalse($r->noSpaces(" usertest")); $this->assertFalse($r->noSpaces("usertest ")); $this->assertFalse($r->noSpaces("user test 1")); $this->assertTrue($r->noSpaces("user")); }