1<?php
2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3//
4// All Rights Reserved. See copyright.txt for details and a complete list of authors.
5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6// $Id$
7
8require_once(__DIR__ . '/../../../language/Exception.php');
9require_once(__DIR__ . '/../../../language/WriteFile/Factory.php');
10
11use org\bovigo\vfs\vfsStream;
12use org\bovigo\vfs\vfsStreamFile;
13
14class Language_WriteFile_FactoryTest extends TikiTestCase
15{
16	protected $obj;
17
18	protected function setUp()
19	{
20		// setup a mock filesystem
21		$lang = vfsStream::setup('lang');
22		$this->langFile = new vfsStreamFile('language.php');
23		$lang->addChild($this->langFile);
24
25		$this->filePath = vfsStream::url('lang/language.php');
26
27		$this->obj = new Language_WriteFile_Factory;
28	}
29
30	public function testFactory_shouldReturnWriteFileObject()
31	{
32		$writeFile = $this->obj->factory($this->filePath);
33		$this->assertEquals('Language_WriteFile', get_class($writeFile));
34	}
35}
36