function testReservedPrefix() { $r = new Rule_UserName(); $this->assertTrue($r->isReservedName("forge__")); $this->assertTrue($r->isReservedName("forge__tutu")); $this->assertFalse($r->isReservedName("forge_loic")); $this->assertFalse($r->isReservedName("forgeron")); }
function testReservedNames() { $r = new Rule_UserName(); $this->assertTrue($r->isReservedName("root")); $this->assertTrue($r->isReservedName("bin")); $this->assertTrue($r->isReservedName("daemon")); $this->assertTrue($r->isReservedName("adm")); $this->assertTrue($r->isReservedName("lp")); $this->assertTrue($r->isReservedName("sync")); $this->assertTrue($r->isReservedName("shutdown")); $this->assertTrue($r->isReservedName("halt")); $this->assertTrue($r->isReservedName("mail")); $this->assertTrue($r->isReservedName("news")); $this->assertTrue($r->isReservedName("uucp")); $this->assertTrue($r->isReservedName("operator")); $this->assertTrue($r->isReservedName("games")); $this->assertTrue($r->isReservedName("mysql")); $this->assertTrue($r->isReservedName("httpd")); $this->assertTrue($r->isReservedName("nobody")); $this->assertTrue($r->isReservedName("dummy")); $this->assertTrue($r->isReservedName("www")); $this->assertTrue($r->isReservedName("cvs")); $this->assertTrue($r->isReservedName("shell")); $this->assertTrue($r->isReservedName("ftp")); $this->assertTrue($r->isReservedName("irc")); $this->assertTrue($r->isReservedName("debian")); $this->assertTrue($r->isReservedName("ns")); $this->assertTrue($r->isReservedName("download")); $this->assertTrue($r->isReservedName("munin")); $this->assertTrue($r->isReservedName("mailman")); $this->assertTrue($r->isReservedName("ftpadmin")); $this->assertTrue($r->isReservedName("codendiadm")); $this->assertTrue($r->isReservedName("imadmin-bot")); $this->assertTrue($r->isReservedName("apache")); $this->assertTrue($r->isReservedName("nscd")); $this->assertTrue($r->isReservedName("git")); $this->assertTrue($r->isReservedName("gitolite")); $this->assertTrue($r->isReservedName("ROOT")); $this->assertTrue($r->isReservedName("WWW")); $this->assertTrue($r->isReservedName("DUMMY")); }