public function testNewFromText()
 {
     $name = 'TitleFactoryTest-testNewFromText';
     $factory = new TitleFactory();
     $title = $factory->newFromText($name, NS_HELP);
     $this->assertEquals(NS_HELP, $title->getNamespace());
     $this->assertEquals($name, $title->getText());
 }
 /**
  * @param string[] $names
  *
  * @return Title[]
  */
 private function getTitlesFromTexts(array $names)
 {
     $titles = array();
     foreach ($names as $name) {
         try {
             $titles[] = $this->titleFactory->newFromText($name);
         } catch (StorageException $ex) {
             // Invalid title in the diff? Skip.
         }
     }
     return $titles;
 }