Closed billehunt closed 9 years ago
anyone out there?
This plugin is/was my favorite; really made development smooth. I've tried running the automated "2to3" utility included with Python 3, but it also gets hung up at the same problem. I've spent some time investigating, but afraid I'm stuck. The full error is:
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 399, in run_
return self.run(edit)
File "C:\Users\Bill\AppData\Roaming\Sublime Text 3\Packages\PHPUnit\phpunit.py", line 876, in run
cmd.run(path, file_to_test)
File "C:\Users\Bill\AppData\Roaming\Sublime Text 3\Packages\PHPUnit\phpunit.py", line 172, in run
self.show_empty_output()
File "C:\Users\Bill\AppData\Roaming\Sublime Text 3\Packages\PHPUnit\phpunit.py", line 155, in show_empty_output
self.output_view.clear_output_view()
File "C:\Users\Bill\AppData\Roaming\Sublime Text 3\Packages\PHPUnit\phpunit.py", line 118, in clear_output_view
edit = self.output_view.begin_edit()
TypeError: begin_edit() missing 2 required positional arguments: 'edit_token' and 'cmd'
TypeError: String required
and line 118 in clear_output_view() is (after 2to3 runs; don't know if line numbering has changed)
edit = self.output_view.begin_edit()
In above post, I noted what SublimeText porting guide says about this.
I'm afraid I have no idea what to do with this info. I've dug some, but it's clear I'll need to learn python and the sublime text plugin world in order to go further and that's not in the cards right now.
Help! Please!
Sorry, but it's going to be a while before I have time to look at porting this plugin to ST3.
Is it already made?
Would really appreciate an update! :+1:
So for the benefit of others on this thread, I wrote a really simple plugin to run phpunit for all tests or just the current test file. I have extremely limited python knowledge, and even less Sublime plugin knowledge, so I'm afraid this must be unsupported by me, but if someone else wants to run with it and expand/publish it themselves, you have my blessing. (if you do, please post a link in this thread so I can use it myself, thanks)
Also, I'm on Windows so if you're on another platform, you'll have to make changes
(in file Sublime Text 3/Packages/User/PhpUnit.py) import sublime, sublime_plugin
def run_phpunit(window, additional=''): project_path = window.folders()[0] + "/tests" phpunit = "phpunit.bat --stop-on-failure -c phpunit.xml " window.run_command('exec', {'cmd': phpunit + additional, 'working_dir': project_path})
class PhpUnitAllCommand(sublime_plugin.TextCommand): def run(self, edit): run_phpunit(self.view.window())
class PhpUnitThisFileCommand(sublime_plugin.TextCommand): def run(self, edit): run_phpunit(self.view.window(), self.view.file_name())
Then, I make my user keymap: [ // PHpUnit commands { "keys": ["ctrl+t", "ctrl+a"], "command": "php_unit_all" }, { "keys": ["ctrl+t", "ctrl+t"], "command": "php_unit_this_file" } ]
On Thu, Apr 11, 2013 at 10:40 AM, schickling notifications@github.comwrote:
Would really appreciate an update! [image: :+1:]
— Reply to this email directly or view it on GitHubhttps://github.com/stuartherbert/sublime-phpunit/issues/19#issuecomment-16249937 .
I'm planning on taking a look at ST3 this month.
@stuartherbert That's great! ST3 comes along with real speed improvements. And I think even the "go to test/production file" command can be simplified on your part.
Hello. Any news on this issue ?
Hey, https://github.com/klaascuvelier/sublime-phpunit Seems to work but is not based on the latest version.
Any updates ?
Hi sir, How's the ST3 version doing?
bumping for interest
...no update?
I've had a first look at this, and you'll find a working version in the new 'st3-support' branch. I don't yet have one code base that works with both ST2 and ST3 - that's next on the list.
I don't think that should be a requirement. -----Original Message----- From: Stuart Herbert notifications@github.com Date: Tue, 06 Aug 2013 09:56:59 To: stuartherbert/sublime-phpunitsublime-phpunit@noreply.github.com Reply-To: stuartherbert/sublime-phpunit reply@reply.github.com Cc: Greg Bowlergreg.bowler@g105b.com Subject: Re: [sublime-phpunit] support for sublime text 3 (#19)
I've had a first look at this, and you'll find a working version in the new 'st3-support' branch. I don't yet have one code base that works with both ST2 and ST3 - that's next on the list.
Reply to this email directly or view it on GitHub: https://github.com/stuartherbert/sublime-phpunit/issues/19#issuecomment-22193925
It's a requirement for a couple of reasons:
Thanks for the update! :heart_eyes_cat:
I still have issues with ST3. Is it possible to publish stable package over Package Control plugin for easy installation?
Thanks :)
Same here @matejkloska
I've got a disabled menu on ST3... phpunit working fine on command line.
Same as lucasrcosta : I've got a disabled menu on Sublime Text 3 while phpunit is working fine on the command line and on Sublime Text 2
Confirmed.
Same as lucasrcosta
The 'develop' branch now supports ST2 and ST3 at the same time. Hoping to publish this via Package Control next week.
The ST3 fixes should be showing up via Package Control shortly.
I'm nearing a version 1.0.0 release of an ST3 only PHPUnit plugin: https://github.com/gerardroche/sublime-phpunit.
Closing as I've had no further reports of problems with ST3.
several issues related to moving to Python 3.3
I commented out the import thread line to see if I could make further progress.
That leads to this not-very-helpful error:
However, the right-click phpunit options show up. I try clicking "Run these tests", and get error:
The sublime text 3 porting guide (http://www.sublimetext.com/docs/3/porting_guide.html) says:
And now I'm lost as I'm not really python-literate