mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 06:33:35 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			611 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			611 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # suggestion? report bugs?
 | |
| # please go to https://github.com/chrisyue/vim-snippets/issues
 | |
| priority -50
 | |
| 
 | |
| snippet test "phpunit test class" b
 | |
| namespace `!p
 | |
| abspath = os.path.abspath(path)
 | |
| m = re.search(r'[A-Z].+(?=/)', abspath)
 | |
| if m:
 | |
| 	snip.rv = m.group().replace('/', '\\')
 | |
| `;
 | |
| 
 | |
| /**
 | |
|  * @author `whoami`
 | |
|  */
 | |
| class `!p
 | |
| snip.rv = re.match(r'.*(?=\.)', fn).group()
 | |
| ` extends \PHPUnit_Framework_TestCase
 | |
| {
 | |
| 	public function test${1}()
 | |
| 	{
 | |
| 		${2}
 | |
| 	}
 | |
| }
 | |
| endsnippet
 | |
| 
 | |
| snippet exp "phpunit expects" i
 | |
| expects($this->${1:once}())
 | |
| 	->method('${2}')
 | |
| 	->with($this->equalTo(${3})${4})
 | |
| 	->will($this->returnValue(${5}));
 | |
| endsnippet
 | 
